swamp 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +2 -0
- data/.travis.yml +8 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +79 -0
- data/README.md +5 -0
- data/Rakefile +8 -0
- data/bin/swamp +20 -0
- data/features/specifications/user_scans_a_page_interactively.feature +10 -0
- data/features/specifications/user_scans_buttons_in_a_page.feature +43 -0
- data/features/specifications/user_scans_fields_in_a_page.feature +38 -0
- data/features/specifications/user_scans_input_buttons_in_a_page.feature +28 -0
- data/features/specifications/user_scans_links_in_a_page.feature +18 -0
- data/features/specifications/user_scans_select_box_elements_in_a_page.feature +28 -0
- data/features/specifications/user_starts_swamp.feature +10 -0
- data/features/step_definitions/swamp_steps.rb +46 -0
- data/features/support/env.rb +2 -0
- data/features/support/page_examples/button.html +1 -0
- data/features/support/page_examples/button.html~ +0 -0
- data/features/support/page_examples/button_without_text.html +1 -0
- data/features/support/page_examples/button_without_text_id_and_value.html +1 -0
- data/features/support/page_examples/button_without_text_without_id_with_value.html +1 -0
- data/features/support/page_examples/checkbox.html +1 -0
- data/features/support/page_examples/field.html +1 -0
- data/features/support/page_examples/field_without_id.html +1 -0
- data/features/support/page_examples/input_submit.html +1 -0
- data/features/support/page_examples/input_submit_without_id.html +1 -0
- data/features/support/page_examples/link.html +1 -0
- data/features/support/page_examples/link.html~ +0 -0
- data/features/support/page_examples/link_with_id.html +5 -0
- data/features/support/page_examples/radio.html +1 -0
- data/features/support/page_examples/select_box_with_id.html +1 -0
- data/features/support/page_examples/select_box_with_name_only.html +1 -0
- data/features/support/setup.rb +42 -0
- data/lib/swamp/base.rb +29 -0
- data/lib/swamp/builder.rb +35 -0
- data/lib/swamp/button.rb +11 -0
- data/lib/swamp/buttons.rb +19 -0
- data/lib/swamp/element.rb +23 -0
- data/lib/swamp/elements.rb +39 -0
- data/lib/swamp/evaluator.rb +20 -0
- data/lib/swamp/field.rb +11 -0
- data/lib/swamp/fields.rb +21 -0
- data/lib/swamp/formatter.rb +51 -0
- data/lib/swamp/input_button.rb +11 -0
- data/lib/swamp/input_buttons.rb +19 -0
- data/lib/swamp/interface.rb +33 -0
- data/lib/swamp/link.rb +11 -0
- data/lib/swamp/links.rb +15 -0
- data/lib/swamp/select_box.rb +11 -0
- data/lib/swamp/select_boxes.rb +17 -0
- data/lib/swamp/version.rb +3 -0
- data/lib/swamp/wrapper.rb +25 -0
- data/lib/swamp.rb +26 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/swamp/builder_spec.rb +36 -0
- data/spec/swamp/buttons_spec.rb +93 -0
- data/spec/swamp/evaluator_spec.rb +75 -0
- data/spec/swamp/fields_spec.rb +88 -0
- data/spec/swamp/formatter_spec.rb +59 -0
- data/spec/swamp/input_buttons_spec.rb +62 -0
- data/spec/swamp/interface_spec.rb +62 -0
- data/spec/swamp/links_spec.rb +34 -0
- data/spec/swamp/select_boxes_spec.rb +53 -0
- data/spec/swamp/wrapper_spec.rb +104 -0
- data/swamp.gemspec +31 -0
- metadata +274 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Swamp
|
3
|
+
describe InputButtons do
|
4
|
+
let(:input_buttons) { Swamp::InputButtons.new }
|
5
|
+
|
6
|
+
it "delegates to capybara the responsibility to get the submit elements" do
|
7
|
+
element = {'value' => "Log In", 'id' => "u_0_b"}
|
8
|
+
element.stub(:visible?).and_return(true)
|
9
|
+
input_buttons.page.should_receive(:all).with('input[type="submit"]').and_return([element])
|
10
|
+
input_buttons.get
|
11
|
+
end
|
12
|
+
|
13
|
+
context "when the element is visible" do
|
14
|
+
context "when the submit element has value and id" do
|
15
|
+
let(:element) { {'value' => "Log In", 'id' => "u_0_b"} }
|
16
|
+
|
17
|
+
before(:each) do
|
18
|
+
element.stub(:visible?).and_return(true)
|
19
|
+
input_buttons.page.stub(:all).with('input[type="submit"]').and_return([element])
|
20
|
+
end
|
21
|
+
|
22
|
+
it "returns the element in the array using the value as the name" do
|
23
|
+
input_buttons.get.should have(1).input_submit
|
24
|
+
input_buttons.get.first.name.should == "Log In"
|
25
|
+
end
|
26
|
+
|
27
|
+
it "returns the element in the array using the id as the selector" do
|
28
|
+
input_buttons.get.should have(1).input_submit
|
29
|
+
input_buttons.get.first.selector.should == "#u_0_b"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context "when the submit element has value but has no id" do
|
34
|
+
let(:element) { {'value' => "Log In", 'class' => "btn without id"} }
|
35
|
+
|
36
|
+
before(:each) do
|
37
|
+
element.stub(:visible?).and_return(true)
|
38
|
+
input_buttons.page.stub(:all).with('input[type="submit"]').and_return([element])
|
39
|
+
end
|
40
|
+
|
41
|
+
it "returns the element in the array using the value as the name" do
|
42
|
+
input_buttons.get.should have(1).input_submit
|
43
|
+
input_buttons.get.first.name.should == "Log In"
|
44
|
+
end
|
45
|
+
|
46
|
+
it "returns the element in the array using the class concatenated with the value as the selector" do
|
47
|
+
input_buttons.get.should have(1).input_submit
|
48
|
+
input_buttons.get.first.selector.should == "input.btn.without.id[value='Log In']"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
context "when the element is not visible" do
|
54
|
+
it "returns an empty array" do
|
55
|
+
element = {'value' => "Log In", 'id' => "u_0_b"}
|
56
|
+
element.stub(:visible?).and_return(false)
|
57
|
+
input_buttons.page.stub(:all).with('input[type="submit"]').and_return([element])
|
58
|
+
input_buttons.get.should == []
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Swamp
|
3
|
+
describe Interface do
|
4
|
+
let(:output) { output = double('output').as_null_object }
|
5
|
+
let(:wrapper) { wrapper = double('wrapper').as_null_object }
|
6
|
+
let(:interface) { interface = Swamp::Interface.new(output, wrapper) }
|
7
|
+
|
8
|
+
describe "#run" do
|
9
|
+
it "prompts for the url" do
|
10
|
+
output.should_receive(:puts).with("Enter the url for the page to be scanned:")
|
11
|
+
interface.run
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "#scan" do
|
16
|
+
it "delegates the responsibility to fire up the browser to the wrapper class" do
|
17
|
+
wrapper.should_receive(:explore)
|
18
|
+
interface.scan("http://www.fakepage.com")
|
19
|
+
end
|
20
|
+
|
21
|
+
it "delegates the page parsing to the wrapper class" do
|
22
|
+
wrapper.should_receive(:scan).and_return(["code_snippet"])
|
23
|
+
interface.scan("http://www.fakepage.com")
|
24
|
+
end
|
25
|
+
|
26
|
+
context "when it scans a valid url" do
|
27
|
+
it "sends the code snippets of the scanned page to the output" do
|
28
|
+
wrapper.stub(:scan).and_return(["code_snippet"])
|
29
|
+
output.should_receive(:puts).with("code_snippet")
|
30
|
+
interface.scan("http://www.fakepage.com")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context "when it scans an invalid url" do
|
35
|
+
it "sends a warning message to the output" do
|
36
|
+
output.should_receive(:puts).with("Please enter a valid url!")
|
37
|
+
interface.scan("abc123")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "when it receives an enter keystroke" do
|
42
|
+
context "when no page was scanned yet" do
|
43
|
+
it "sends a warning message to the output" do
|
44
|
+
wrapper.stub(:page_visited).and_return(false)
|
45
|
+
output.should_receive(:puts).with("Please enter a valid url!")
|
46
|
+
interface.scan("\n")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context "when a page was already scanned" do
|
51
|
+
it "scans the current page and sends the code snippets to the output" do
|
52
|
+
wrapper.stub(:page_visited).and_return(true)
|
53
|
+
wrapper.stub(:scan).and_return(["code_snippet"])
|
54
|
+
output.should_receive(:puts).with("code_snippet")
|
55
|
+
interface.scan("\n")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Swamp
|
3
|
+
describe Links do
|
4
|
+
let(:links) { Swamp::Links.new }
|
5
|
+
|
6
|
+
it "delegates to capybara the responsibility to get the links" do
|
7
|
+
element = {'id' => "forgot-password", 'href' => "https://somewhere.com"}
|
8
|
+
element.stub(:visible?).and_return(true)
|
9
|
+
links.page.should_receive(:all).with('a[href]').and_return([element])
|
10
|
+
links.get
|
11
|
+
end
|
12
|
+
|
13
|
+
context "when the element is visible" do
|
14
|
+
context "when the link has id" do
|
15
|
+
let(:element) { {'id' => "forgot-password", 'href' => "https://somewhere.com"} }
|
16
|
+
|
17
|
+
before(:each) do
|
18
|
+
element.stub(:visible?).and_return(true)
|
19
|
+
links.page.stub(:all).with('a[href]').and_return([element])
|
20
|
+
end
|
21
|
+
|
22
|
+
it "returns the element in the array using the id as the name" do
|
23
|
+
links.get.should have(1).link
|
24
|
+
links.get.first.name.should == "forgot-password"
|
25
|
+
end
|
26
|
+
|
27
|
+
it "returns the element in the array using the id as the selector" do
|
28
|
+
links.get.should have(1).select_box
|
29
|
+
links.get.first.selector.should == "forgot-password"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Swamp
|
3
|
+
describe SelectBoxes do
|
4
|
+
let(:select_boxes) { Swamp::SelectBoxes.new }
|
5
|
+
|
6
|
+
it "delegates to capybara the responsibility to get the select box elements" do
|
7
|
+
element = {'id' => "month", 'name' => "birthday_month"}
|
8
|
+
element.stub(:visible?).and_return(true)
|
9
|
+
select_boxes.page.should_receive(:all).with('select').and_return([element])
|
10
|
+
select_boxes.get
|
11
|
+
end
|
12
|
+
|
13
|
+
context "when the element is visible" do
|
14
|
+
context "when the select box has id" do
|
15
|
+
let(:element) { {'id' => "month", 'name' => "birthday_month"} }
|
16
|
+
|
17
|
+
before(:each) do
|
18
|
+
element.stub(:visible?).and_return(true)
|
19
|
+
select_boxes.page.stub(:all).with('select').and_return([element])
|
20
|
+
end
|
21
|
+
|
22
|
+
it "returns the element in the array using the id as the name" do
|
23
|
+
select_boxes.get.should have(1).select_box
|
24
|
+
select_boxes.get.first.name.should == "month"
|
25
|
+
end
|
26
|
+
|
27
|
+
it "returns the element in the array using the id as the selector" do
|
28
|
+
select_boxes.get.should have(1).select_box
|
29
|
+
select_boxes.get.first.selector.should == "month"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context "when the select element has name but no id" do
|
34
|
+
let(:element) { {'name' => "birthday_month"} }
|
35
|
+
|
36
|
+
before(:each) do
|
37
|
+
element.stub(:visible?).and_return(true)
|
38
|
+
select_boxes.page.stub(:all).with('select').and_return([element])
|
39
|
+
end
|
40
|
+
|
41
|
+
it "returns the element in the array using the name as the name" do
|
42
|
+
select_boxes.get.should have(1).select_box
|
43
|
+
select_boxes.get.first.name.should == "birthday_month"
|
44
|
+
end
|
45
|
+
|
46
|
+
it "returns the element in the array using the name as the selector" do
|
47
|
+
select_boxes.get.should have(1).select_box
|
48
|
+
select_boxes.get.first.selector.should == "birthday_month"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Swamp
|
3
|
+
describe Wrapper do
|
4
|
+
describe "#explore" do
|
5
|
+
it "fires up the browser to a given url" do
|
6
|
+
url = "www.fakepage.com"
|
7
|
+
meta_collection = []
|
8
|
+
wrapper = Swamp::Wrapper.new(meta_collection)
|
9
|
+
wrapper.should_receive(:visit).with(url).and_return("")
|
10
|
+
wrapper.explore(url)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "#scan" do
|
15
|
+
let(:fields) { double('fields').as_null_object }
|
16
|
+
let(:buttons) { double('buttons').as_null_object }
|
17
|
+
let(:input_buttons) { double('input_buttons').as_null_object }
|
18
|
+
let(:select_boxes) { double('select_boxes').as_null_object }
|
19
|
+
let(:links) { double('links').as_null_object }
|
20
|
+
let(:generic_element_collection) { double('generic_element_collection').as_null_object }
|
21
|
+
|
22
|
+
it "delegates the responsibility of getting the elements for each element collection object" do
|
23
|
+
meta_collection = [generic_element_collection]
|
24
|
+
wrapper = Swamp::Wrapper.new(meta_collection)
|
25
|
+
meta_collection.each { |element_collection| element_collection.should_receive(:get).and_return([]) }
|
26
|
+
wrapper.scan
|
27
|
+
end
|
28
|
+
|
29
|
+
context "when field elements were found" do
|
30
|
+
let(:field) { Swamp::Field.new("username", "username") }
|
31
|
+
|
32
|
+
it "returns an array of formatted code snippets for fields" do
|
33
|
+
fields.stub(:get).and_return([field])
|
34
|
+
|
35
|
+
meta_collection = [fields]
|
36
|
+
wrapper = Swamp::Wrapper.new(meta_collection)
|
37
|
+
wrapper.scan.should == ["def type_username(input)\n source.fill_in(\"username\", with: input)\nend"]
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "when button elements were found" do
|
42
|
+
let(:button) { Swamp::Button.new("log_in", "log_in") }
|
43
|
+
|
44
|
+
it "returns an array of formatted code snippets for buttons" do
|
45
|
+
buttons.stub(:get).and_return([button])
|
46
|
+
|
47
|
+
meta_collection = [buttons]
|
48
|
+
wrapper = Swamp::Wrapper.new(meta_collection)
|
49
|
+
wrapper.scan.should == ["def log_in\n source.click_button(\"log_in\")\nend"]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
context "when input button elements were found" do
|
54
|
+
let(:input_button) { Swamp::InputButton.new("Log In", "input#u_0_b") }
|
55
|
+
|
56
|
+
it "returns an array of formatted code snippets for input buttons" do
|
57
|
+
input_buttons.stub(:get).and_return([input_button])
|
58
|
+
|
59
|
+
meta_collection = [input_buttons]
|
60
|
+
wrapper = Swamp::Wrapper.new(meta_collection)
|
61
|
+
wrapper.scan.should == ["def log_in\n source.find(:css, \"input#u_0_b\").click\nend"]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
context "when select box elements were found" do
|
66
|
+
let(:select_box) { Swamp::SelectBox.new("month", "month") }
|
67
|
+
|
68
|
+
it "returns an array of formatted code snippets for select boxes" do
|
69
|
+
select_boxes.stub(:get).and_return([select_box])
|
70
|
+
|
71
|
+
meta_collection = [select_boxes]
|
72
|
+
wrapper = Swamp::Wrapper.new(meta_collection)
|
73
|
+
wrapper.scan.should == ["def select_month(option)\n source.select(option, :from => \"month\")\nend"]
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
context "when links were found" do
|
78
|
+
let(:link) { Swamp::Link.new("forgot-password", "forgot-password") }
|
79
|
+
|
80
|
+
it "returns an array of formatted code snippets for links" do
|
81
|
+
links.stub(:get).and_return([link])
|
82
|
+
|
83
|
+
meta_collection = [links]
|
84
|
+
wrapper = Swamp::Wrapper.new(meta_collection)
|
85
|
+
wrapper.scan.should == ["def forgot_password\n source.click_link(\"forgot-password\")\nend"]
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
context "when no elements were found" do
|
90
|
+
it "returns an empty array" do
|
91
|
+
fields.stub(:get).and_return([])
|
92
|
+
buttons.stub(:get).and_return([])
|
93
|
+
input_buttons.stub(:get).and_return([])
|
94
|
+
select_boxes.stub(:get).and_return([])
|
95
|
+
links.stub(:get).and_return([])
|
96
|
+
|
97
|
+
meta_collection = [fields, buttons, input_buttons, select_boxes]
|
98
|
+
wrapper = Swamp::Wrapper.new(meta_collection)
|
99
|
+
wrapper.scan.should == []
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
data/swamp.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'swamp/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "swamp"
|
8
|
+
spec.version = Swamp::VERSION
|
9
|
+
spec.authors = ["Juraci de Lima Vieira Neto"]
|
10
|
+
spec.email = ["juraci.vieira@gmail.com"]
|
11
|
+
spec.description = "Automatically generates the methods and selectors to help on faster page-object creation using capybara"
|
12
|
+
spec.summary = "Swamp, where capybaras belong"
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "capybara"
|
22
|
+
spec.add_dependency "selenium-webdriver"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
25
|
+
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "rspec"
|
27
|
+
spec.add_development_dependency "cucumber"
|
28
|
+
spec.add_development_dependency "json"
|
29
|
+
spec.add_development_dependency "pry"
|
30
|
+
spec.add_development_dependency "pry-nav"
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,274 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: swamp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Juraci de Lima Vieira Neto
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-09-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capybara
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: selenium-webdriver
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: cucumber
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: json
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pry-nav
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: Automatically generates the methods and selectors to help on faster page-object
|
140
|
+
creation using capybara
|
141
|
+
email:
|
142
|
+
- juraci.vieira@gmail.com
|
143
|
+
executables:
|
144
|
+
- swamp
|
145
|
+
extensions: []
|
146
|
+
extra_rdoc_files: []
|
147
|
+
files:
|
148
|
+
- .rspec
|
149
|
+
- .travis.yml
|
150
|
+
- Gemfile
|
151
|
+
- Gemfile.lock
|
152
|
+
- README.md
|
153
|
+
- Rakefile
|
154
|
+
- bin/swamp
|
155
|
+
- features/specifications/user_scans_a_page_interactively.feature
|
156
|
+
- features/specifications/user_scans_buttons_in_a_page.feature
|
157
|
+
- features/specifications/user_scans_fields_in_a_page.feature
|
158
|
+
- features/specifications/user_scans_input_buttons_in_a_page.feature
|
159
|
+
- features/specifications/user_scans_links_in_a_page.feature
|
160
|
+
- features/specifications/user_scans_select_box_elements_in_a_page.feature
|
161
|
+
- features/specifications/user_starts_swamp.feature
|
162
|
+
- features/step_definitions/swamp_steps.rb
|
163
|
+
- features/support/env.rb
|
164
|
+
- features/support/page_examples/button.html
|
165
|
+
- features/support/page_examples/button.html~
|
166
|
+
- features/support/page_examples/button_without_text.html
|
167
|
+
- features/support/page_examples/button_without_text_id_and_value.html
|
168
|
+
- features/support/page_examples/button_without_text_without_id_with_value.html
|
169
|
+
- features/support/page_examples/checkbox.html
|
170
|
+
- features/support/page_examples/field.html
|
171
|
+
- features/support/page_examples/field_without_id.html
|
172
|
+
- features/support/page_examples/input_submit.html
|
173
|
+
- features/support/page_examples/input_submit_without_id.html
|
174
|
+
- features/support/page_examples/link.html
|
175
|
+
- features/support/page_examples/link.html~
|
176
|
+
- features/support/page_examples/link_with_id.html
|
177
|
+
- features/support/page_examples/radio.html
|
178
|
+
- features/support/page_examples/select_box_with_id.html
|
179
|
+
- features/support/page_examples/select_box_with_name_only.html
|
180
|
+
- features/support/setup.rb
|
181
|
+
- lib/swamp.rb
|
182
|
+
- lib/swamp/base.rb
|
183
|
+
- lib/swamp/builder.rb
|
184
|
+
- lib/swamp/button.rb
|
185
|
+
- lib/swamp/buttons.rb
|
186
|
+
- lib/swamp/element.rb
|
187
|
+
- lib/swamp/elements.rb
|
188
|
+
- lib/swamp/evaluator.rb
|
189
|
+
- lib/swamp/field.rb
|
190
|
+
- lib/swamp/fields.rb
|
191
|
+
- lib/swamp/formatter.rb
|
192
|
+
- lib/swamp/input_button.rb
|
193
|
+
- lib/swamp/input_buttons.rb
|
194
|
+
- lib/swamp/interface.rb
|
195
|
+
- lib/swamp/link.rb
|
196
|
+
- lib/swamp/links.rb
|
197
|
+
- lib/swamp/select_box.rb
|
198
|
+
- lib/swamp/select_boxes.rb
|
199
|
+
- lib/swamp/version.rb
|
200
|
+
- lib/swamp/wrapper.rb
|
201
|
+
- spec/spec_helper.rb
|
202
|
+
- spec/swamp/builder_spec.rb
|
203
|
+
- spec/swamp/buttons_spec.rb
|
204
|
+
- spec/swamp/evaluator_spec.rb
|
205
|
+
- spec/swamp/fields_spec.rb
|
206
|
+
- spec/swamp/formatter_spec.rb
|
207
|
+
- spec/swamp/input_buttons_spec.rb
|
208
|
+
- spec/swamp/interface_spec.rb
|
209
|
+
- spec/swamp/links_spec.rb
|
210
|
+
- spec/swamp/select_boxes_spec.rb
|
211
|
+
- spec/swamp/wrapper_spec.rb
|
212
|
+
- swamp.gemspec
|
213
|
+
homepage: ''
|
214
|
+
licenses:
|
215
|
+
- MIT
|
216
|
+
metadata: {}
|
217
|
+
post_install_message:
|
218
|
+
rdoc_options: []
|
219
|
+
require_paths:
|
220
|
+
- lib
|
221
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
222
|
+
requirements:
|
223
|
+
- - '>='
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: '0'
|
226
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
227
|
+
requirements:
|
228
|
+
- - '>='
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: '0'
|
231
|
+
requirements: []
|
232
|
+
rubyforge_project:
|
233
|
+
rubygems_version: 2.0.3
|
234
|
+
signing_key:
|
235
|
+
specification_version: 4
|
236
|
+
summary: Swamp, where capybaras belong
|
237
|
+
test_files:
|
238
|
+
- features/specifications/user_scans_a_page_interactively.feature
|
239
|
+
- features/specifications/user_scans_buttons_in_a_page.feature
|
240
|
+
- features/specifications/user_scans_fields_in_a_page.feature
|
241
|
+
- features/specifications/user_scans_input_buttons_in_a_page.feature
|
242
|
+
- features/specifications/user_scans_links_in_a_page.feature
|
243
|
+
- features/specifications/user_scans_select_box_elements_in_a_page.feature
|
244
|
+
- features/specifications/user_starts_swamp.feature
|
245
|
+
- features/step_definitions/swamp_steps.rb
|
246
|
+
- features/support/env.rb
|
247
|
+
- features/support/page_examples/button.html
|
248
|
+
- features/support/page_examples/button.html~
|
249
|
+
- features/support/page_examples/button_without_text.html
|
250
|
+
- features/support/page_examples/button_without_text_id_and_value.html
|
251
|
+
- features/support/page_examples/button_without_text_without_id_with_value.html
|
252
|
+
- features/support/page_examples/checkbox.html
|
253
|
+
- features/support/page_examples/field.html
|
254
|
+
- features/support/page_examples/field_without_id.html
|
255
|
+
- features/support/page_examples/input_submit.html
|
256
|
+
- features/support/page_examples/input_submit_without_id.html
|
257
|
+
- features/support/page_examples/link.html
|
258
|
+
- features/support/page_examples/link.html~
|
259
|
+
- features/support/page_examples/link_with_id.html
|
260
|
+
- features/support/page_examples/radio.html
|
261
|
+
- features/support/page_examples/select_box_with_id.html
|
262
|
+
- features/support/page_examples/select_box_with_name_only.html
|
263
|
+
- features/support/setup.rb
|
264
|
+
- spec/spec_helper.rb
|
265
|
+
- spec/swamp/builder_spec.rb
|
266
|
+
- spec/swamp/buttons_spec.rb
|
267
|
+
- spec/swamp/evaluator_spec.rb
|
268
|
+
- spec/swamp/fields_spec.rb
|
269
|
+
- spec/swamp/formatter_spec.rb
|
270
|
+
- spec/swamp/input_buttons_spec.rb
|
271
|
+
- spec/swamp/interface_spec.rb
|
272
|
+
- spec/swamp/links_spec.rb
|
273
|
+
- spec/swamp/select_boxes_spec.rb
|
274
|
+
- spec/swamp/wrapper_spec.rb
|