taza 2.1.0 → 4.0.0
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 +5 -5
- data/History.txt +8 -0
- data/README.md +4 -4
- data/lib/taza/browser.rb +1 -29
- data/lib/taza/entity.rb +1 -2
- data/lib/taza/fixture.rb +1 -2
- data/lib/taza/generators/project_generator.rb +5 -5
- data/lib/taza/page.rb +3 -5
- data/lib/taza/site.rb +6 -2
- data/lib/taza/version.rb +1 -1
- data/lib/taza.rb +0 -4
- data/spec/generators/flow_generator_spec.rb +4 -4
- data/spec/generators/page_generator_spec.rb +5 -5
- data/spec/generators/partial_generator_spec.rb +4 -4
- data/spec/generators/project_generator_spec.rb +8 -8
- data/spec/generators/site_generator_spec.rb +4 -4
- data/spec/spec_helper.rb +7 -9
- data/spec/taza/browser_spec.rb +9 -9
- data/spec/taza/fixture_spec.rb +1 -2
- data/spec/taza/fixtures_spec.rb +9 -8
- data/spec/taza/page_module_spec.rb +5 -5
- data/spec/taza/page_spec.rb +19 -17
- data/spec/taza/settings_spec.rb +1 -1
- data/spec/taza/site_fixtures_spec.rb +9 -4
- data/spec/taza/site_spec.rb +9 -10
- metadata +36 -92
- data/.gitignore +0 -6
- data/.rspec +0 -1
- data/.ruby-gemset +0 -1
- data/.travis.yml +0 -39
- data/Gemfile +0 -3
- data/Gemfile.activesupport-3.2 +0 -5
- data/Gemfile.activesupport-4.0 +0 -5
- data/Gemfile.activesupport-4.1 +0 -5
- data/Gemfile.activesupport-4.2 +0 -5
- data/Gemfile.activesupport-5.0 +0 -5
- data/Manifest.txt +0 -61
- data/Rakefile +0 -5
- data/TODO +0 -22
- data/lib/extensions/array.rb +0 -10
- data/lib/extensions/hash.rb +0 -15
- data/lib/extensions/object.rb +0 -6
- data/lib/extensions/string.rb +0 -22
- data/spec/taza/array_spec.rb +0 -17
- data/spec/taza/hash_spec.rb +0 -15
- data/spec/taza/string_spec.rb +0 -12
- data/taza.gemspec +0 -31
data/lib/extensions/array.rb
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
class Array
|
2
|
-
# Returns true if the two arrays elements are equal ignoring order
|
3
|
-
# Example:
|
4
|
-
# [1,2].equivalent([2,1]) # => true
|
5
|
-
# [1,2,3].equivalent([2,1]) # => false
|
6
|
-
def equivalent?(other_array)
|
7
|
-
merged_array = self & other_array
|
8
|
-
merged_array.size == self.size && merged_array.size == other_array.size
|
9
|
-
end
|
10
|
-
end
|
data/lib/extensions/hash.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
class Hash
|
2
|
-
def convert_hash_keys_to_methods(fixture) # :nodoc:
|
3
|
-
Taza::Entity.new(self,fixture)
|
4
|
-
end
|
5
|
-
|
6
|
-
# Recursively replace key names that should be symbols with symbols.
|
7
|
-
def key_strings_to_symbols!
|
8
|
-
result = Hash.new
|
9
|
-
self.each_pair do |key,value|
|
10
|
-
value.key_strings_to_symbols! if value.kind_of? Hash and value.respond_to? :key_strings_to_symbols!
|
11
|
-
result[key.to_sym] = value
|
12
|
-
end
|
13
|
-
self.replace(result)
|
14
|
-
end
|
15
|
-
end
|
data/lib/extensions/object.rb
DELETED
data/lib/extensions/string.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
|
2
|
-
class String
|
3
|
-
# pluralizes a string and turns it into a symbol
|
4
|
-
# Example:
|
5
|
-
# "apple".pluralize_to_sym # => :apples
|
6
|
-
def pluralize_to_sym
|
7
|
-
self.pluralize.to_sym
|
8
|
-
end
|
9
|
-
|
10
|
-
# takes human readable words and
|
11
|
-
# turns it into ruby variable format
|
12
|
-
# dash and spaces to underscore
|
13
|
-
# and lowercases
|
14
|
-
def variablize
|
15
|
-
self.squeeze!(' ')
|
16
|
-
self.gsub!(/\s+/,'_')
|
17
|
-
self.gsub!('-', '_')
|
18
|
-
self.squeeze!('_')
|
19
|
-
self.downcase!
|
20
|
-
self
|
21
|
-
end
|
22
|
-
end
|
data/spec/taza/array_spec.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'extensions/array'
|
3
|
-
|
4
|
-
describe 'Array Extensions' do
|
5
|
-
it "should know if elements are not equivalent to a subset of those elements" do
|
6
|
-
expect([1,2,3]).to_not be_equivalent [2,3]
|
7
|
-
end
|
8
|
-
it "should know if elements are not equivalent to a larger set including those elements" do
|
9
|
-
expect([1,2,3]).to_not be_equivalent [1,2,3,4]
|
10
|
-
end
|
11
|
-
it "should know it is equivalent if the same order" do
|
12
|
-
expect([1,2,3]).to be_equivalent [1,2,3]
|
13
|
-
end
|
14
|
-
it "should know it is equivalent if the different orders" do
|
15
|
-
expect([1,2,3]).to be_equivalent [2,1,3]
|
16
|
-
end
|
17
|
-
end
|
data/spec/taza/hash_spec.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'taza/entity'
|
3
|
-
require 'extensions/hash'
|
4
|
-
|
5
|
-
# This is too tightly coupled to Taza::Entity
|
6
|
-
describe 'Hash Extensions' do
|
7
|
-
it "should add methods for hash keys to some instance" do
|
8
|
-
entity = {'apple' => 'pie'}.convert_hash_keys_to_methods(nil)
|
9
|
-
expect(entity).to respond_to :apple
|
10
|
-
end
|
11
|
-
it "should not add the methods to a hash" do
|
12
|
-
entity = {'apple' => 'pie'}.convert_hash_keys_to_methods(nil)
|
13
|
-
expect(entity).to_not be_a_instance_of Hash
|
14
|
-
end
|
15
|
-
end
|
data/spec/taza/string_spec.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'extensions/string'
|
3
|
-
|
4
|
-
describe "string extensions" do
|
5
|
-
it "should pluralize and to sym a string" do
|
6
|
-
expect("apple".pluralize_to_sym).to eql :apples
|
7
|
-
end
|
8
|
-
|
9
|
-
it "should variablize words with spaces" do
|
10
|
-
expect("foo - BAR".variablize).to eql 'foo_bar'
|
11
|
-
end
|
12
|
-
end
|
data/taza.gemspec
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "taza/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = "taza"
|
7
|
-
s.version = Taza::VERSION
|
8
|
-
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ["Adam Anderson", "Pedro Nascimento", "Oscar Rieken"]
|
10
|
-
s.email = ["watir-general@googlegroups.com"]
|
11
|
-
s.homepage = "http://github.com/hammernight/taza"
|
12
|
-
s.summary = "Taza is an opinionated page object framework."
|
13
|
-
s.description = "Taza is an opinionated page object framework."
|
14
|
-
s.required_ruby_version = '>= 2.0.0'
|
15
|
-
s.rubyforge_project = "taza"
|
16
|
-
s.files = `git ls-files`.split("\n")
|
17
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
19
|
-
s.require_paths = ["lib"]
|
20
|
-
|
21
|
-
s.add_runtime_dependency(%q<rake>, [">= 0.9.2"])
|
22
|
-
s.add_runtime_dependency(%q<mocha>, [">= 0.9.3"])
|
23
|
-
s.add_runtime_dependency(%q<user-choices>, ["~> 1.1.6.1"])
|
24
|
-
s.add_runtime_dependency(%q<Selenium>, ["~> 1.1.14"])
|
25
|
-
s.add_runtime_dependency(%q<firewatir>, ["~> 1.9.4"])
|
26
|
-
s.add_runtime_dependency(%q<watir-webdriver>, ["~> 0.4"])
|
27
|
-
s.add_runtime_dependency(%q<watir>, [">= 5.0.0"])
|
28
|
-
s.add_runtime_dependency(%q<activesupport>, [">= 3.2.0"])
|
29
|
-
s.add_runtime_dependency(%q<thor>, [">= 0.18.1"])
|
30
|
-
s.add_runtime_dependency(%q<rspec>, ["~> 3.0"])
|
31
|
-
end
|