-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit. Added a session, credentials holder and a template cl…
…ass. The session class is incomplete.
- Loading branch information
0 parents
commit aa49381
Showing
19 changed files
with
600 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at [email protected]. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in reisa-wrapper.gemspec | ||
gemspec | ||
|
||
group :development do | ||
gem 'guard' | ||
gem 'guard-rspec' | ||
gem 'guard-bundler', require: false | ||
end | ||
|
||
group :test do | ||
gem 'webmock' | ||
gem 'byebug' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
reisa-wrapper (0.1.0) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
addressable (2.5.1) | ||
public_suffix (~> 2.0, >= 2.0.2) | ||
byebug (9.0.6) | ||
coderay (1.1.1) | ||
crack (0.4.3) | ||
safe_yaml (~> 1.0.0) | ||
diff-lcs (1.3) | ||
domain_name (0.5.20170404) | ||
unf (>= 0.0.5, < 1.0.0) | ||
ffi (1.9.18) | ||
formatador (0.2.5) | ||
guard (2.14.1) | ||
formatador (>= 0.2.4) | ||
listen (>= 2.7, < 4.0) | ||
lumberjack (~> 1.0) | ||
nenv (~> 0.1) | ||
notiffany (~> 0.0) | ||
pry (>= 0.9.12) | ||
shellany (~> 0.0) | ||
thor (>= 0.18.1) | ||
guard-bundler (2.1.0) | ||
bundler (~> 1.0) | ||
guard (~> 2.2) | ||
guard-compat (~> 1.1) | ||
guard-compat (1.2.1) | ||
guard-rspec (4.7.3) | ||
guard (~> 2.1) | ||
guard-compat (~> 1.1) | ||
rspec (>= 2.99.0, < 4.0) | ||
hashdiff (0.3.4) | ||
http-cookie (1.0.3) | ||
domain_name (~> 0.5) | ||
json (2.1.0) | ||
listen (3.1.5) | ||
rb-fsevent (~> 0.9, >= 0.9.4) | ||
rb-inotify (~> 0.9, >= 0.9.7) | ||
ruby_dep (~> 1.2) | ||
lumberjack (1.0.12) | ||
method_source (0.8.2) | ||
mime-types (3.1) | ||
mime-types-data (~> 3.2015) | ||
mime-types-data (3.2016.0521) | ||
nenv (0.3.0) | ||
netrc (0.11.0) | ||
notiffany (0.1.1) | ||
nenv (~> 0.1) | ||
shellany (~> 0.0) | ||
pry (0.10.4) | ||
coderay (~> 1.1.0) | ||
method_source (~> 0.8.1) | ||
slop (~> 3.4) | ||
public_suffix (2.0.5) | ||
rake (10.5.0) | ||
rb-fsevent (0.10.2) | ||
rb-inotify (0.9.10) | ||
ffi (>= 0.5.0, < 2) | ||
rest-client (2.0.2) | ||
http-cookie (>= 1.0.2, < 2.0) | ||
mime-types (>= 1.16, < 4.0) | ||
netrc (~> 0.8) | ||
rspec (3.6.0) | ||
rspec-core (~> 3.6.0) | ||
rspec-expectations (~> 3.6.0) | ||
rspec-mocks (~> 3.6.0) | ||
rspec-core (3.6.0) | ||
rspec-support (~> 3.6.0) | ||
rspec-expectations (3.6.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.6.0) | ||
rspec-mocks (3.6.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.6.0) | ||
rspec-support (3.6.0) | ||
ruby_dep (1.5.0) | ||
safe_yaml (1.0.4) | ||
shellany (0.0.1) | ||
slop (3.6.0) | ||
thor (0.19.4) | ||
unf (0.1.4) | ||
unf_ext | ||
unf_ext (0.0.7.4) | ||
webmock (3.0.1) | ||
addressable (>= 2.3.6) | ||
crack (>= 0.3.2) | ||
hashdiff | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
bundler (~> 1.13) | ||
byebug | ||
guard | ||
guard-bundler | ||
guard-rspec | ||
json | ||
rake (~> 10.0) | ||
reisa-wrapper! | ||
rest-client | ||
rspec (~> 3.0) | ||
webmock | ||
|
||
BUNDLED WITH | ||
1.13.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# A sample Guardfile | ||
# More info at https://github.com/guard/guard#readme | ||
|
||
## Uncomment and set this to only include directories you want to watch | ||
# directories %w(app lib config test spec features) \ | ||
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")} | ||
|
||
## Note: if you are using the `directories` clause above and you are not | ||
## watching the project directory ('.'), then you will want to move | ||
## the Guardfile to a watched dir and symlink it back, e.g. | ||
# | ||
# $ mkdir config | ||
# $ mv Guardfile config/ | ||
# $ ln -s config/Guardfile . | ||
# | ||
# and, you'll have to watch "config/Guardfile" instead of "Guardfile" | ||
|
||
# Note: The cmd option is now required due to the increasing number of ways | ||
# rspec may be run, below are examples of the most common uses. | ||
# * bundler: 'bundle exec rspec' | ||
# * bundler binstubs: 'bin/rspec' | ||
# * spring: 'bin/rspec' (This will use spring if running and you have | ||
# installed the spring binstubs per the docs) | ||
# * zeus: 'zeus rspec' (requires the server to be started separately) | ||
# * 'just' rspec: 'rspec' | ||
|
||
guard :rspec, cmd: "bundle exec rspec" do | ||
require "guard/rspec/dsl" | ||
dsl = Guard::RSpec::Dsl.new(self) | ||
|
||
# Feel free to open issues for suggestions and improvements | ||
|
||
# RSpec files | ||
rspec = dsl.rspec | ||
watch(rspec.spec_helper) { rspec.spec_dir } | ||
watch(rspec.spec_support) { rspec.spec_dir } | ||
watch(rspec.spec_files) | ||
|
||
# Ruby files | ||
ruby = dsl.ruby | ||
dsl.watch_spec_files_for(ruby.lib_files) | ||
|
||
# Rails files | ||
rails = dsl.rails(view_extensions: %w(erb haml slim)) | ||
dsl.watch_spec_files_for(rails.app_files) | ||
dsl.watch_spec_files_for(rails.views) | ||
|
||
watch(rails.controllers) do |m| | ||
[ | ||
rspec.spec.call("routing/#{m[1]}_routing"), | ||
rspec.spec.call("controllers/#{m[1]}_controller"), | ||
rspec.spec.call("acceptance/#{m[1]}") | ||
] | ||
end | ||
|
||
# Rails config changes | ||
watch(rails.spec_helper) { rspec.spec_dir } | ||
watch(rails.routes) { "#{rspec.spec_dir}/routing" } | ||
watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" } | ||
|
||
# Capybara features specs | ||
watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") } | ||
watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") } | ||
|
||
# Turnip features and steps | ||
watch(%r{^spec/acceptance/(.+)\.feature$}) | ||
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m| | ||
Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance" | ||
end | ||
end | ||
|
||
guard :bundler do | ||
require 'guard/bundler' | ||
require 'guard/bundler/verify' | ||
helper = Guard::Bundler::Verify.new | ||
|
||
files = ['Gemfile'] | ||
files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) } | ||
|
||
# Assume files are symlinked from somewhere | ||
files.each { |file| watch(helper.real_path(file)) } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Reisa::Wrapper | ||
|
||
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/reisa/wrapper`. To experiment with that code, run `bin/console` for an interactive prompt. | ||
|
||
TODO: Delete this and the text above, and describe your gem | ||
|
||
## Installation | ||
|
||
Add this line to your application's Gemfile: | ||
|
||
```ruby | ||
gem 'reisa-wrapper' | ||
``` | ||
|
||
And then execute: | ||
|
||
$ bundle | ||
|
||
Or install it yourself as: | ||
|
||
$ gem install reisa-wrapper | ||
|
||
## Usage | ||
|
||
TODO: Write usage instructions here | ||
|
||
## Development | ||
|
||
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. | ||
|
||
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). | ||
|
||
## Contributing | ||
|
||
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/reisa-wrapper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
require "bundler/gem_tasks" | ||
require "rspec/core/rake_task" | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
task :default => :spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require "bundler/setup" | ||
require "reisa/wrapper" | ||
|
||
# You can add fixtures and/or initialization code here to make experimenting | ||
# with your gem easier. You can also use a different console, if you like. | ||
|
||
# (If you use this, don't forget to add pry to your Gemfile!) | ||
# require "pry" | ||
# Pry.start | ||
|
||
require "irb" | ||
IRB.start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx | ||
|
||
bundle install | ||
|
||
# Do any other automated setup that you need to do here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class String | ||
def parse_json | ||
JSON.parse(self) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Reisa | ||
class Credentials | ||
attr_reader :username, :password | ||
|
||
def initialize username: '', password: '' | ||
@username, @password = username, password | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require "reisa/version" | ||
require 'reisa/core_ext' | ||
|
||
require 'rest-client' | ||
require 'byebug' | ||
require 'json' | ||
|
||
module Reisa | ||
class Session | ||
def self.get path: '' | ||
'{}' | ||
end | ||
end | ||
end |
Oops, something went wrong.