page_magic 1.2.9 → 2.0.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +3 -3
  3. data/.simplecov +4 -2
  4. data/.zsh_config +6 -0
  5. data/Dockerfile +10 -0
  6. data/Gemfile +10 -11
  7. data/Gemfile.lock +120 -133
  8. data/Makefile +13 -0
  9. data/Rakefile +3 -1
  10. data/VERSION +1 -1
  11. data/lib/page_magic.rb +5 -3
  12. data/lib/page_magic/class_methods.rb +4 -1
  13. data/lib/page_magic/driver.rb +3 -0
  14. data/lib/page_magic/drivers.rb +3 -1
  15. data/lib/page_magic/drivers/poltergeist.rb +2 -0
  16. data/lib/page_magic/drivers/rack_test.rb +3 -1
  17. data/lib/page_magic/drivers/selenium.rb +4 -2
  18. data/lib/page_magic/element.rb +8 -5
  19. data/lib/page_magic/element/locators.rb +4 -1
  20. data/lib/page_magic/element/query.rb +11 -2
  21. data/lib/page_magic/element/query_builder.rb +15 -2
  22. data/lib/page_magic/element/selector.rb +3 -0
  23. data/lib/page_magic/element/selector_methods.rb +3 -0
  24. data/lib/page_magic/element_context.rb +2 -0
  25. data/lib/page_magic/element_definition_builder.rb +4 -1
  26. data/lib/page_magic/elements.rb +42 -6
  27. data/lib/page_magic/exceptions.rb +3 -1
  28. data/lib/page_magic/instance_methods.rb +2 -0
  29. data/lib/page_magic/matcher.rb +10 -1
  30. data/lib/page_magic/session.rb +7 -5
  31. data/lib/page_magic/session_methods.rb +2 -0
  32. data/lib/page_magic/utils/string.rb +2 -0
  33. data/lib/page_magic/wait_methods.rb +3 -0
  34. data/lib/page_magic/watcher.rb +2 -0
  35. data/lib/page_magic/watchers.rb +4 -1
  36. data/spec/element_spec.rb +2 -0
  37. data/spec/page_magic/class_methods_spec.rb +2 -0
  38. data/spec/page_magic/driver_spec.rb +2 -0
  39. data/spec/page_magic/drivers/poltergeist_spec.rb +2 -0
  40. data/spec/page_magic/drivers/rack_test_spec.rb +2 -0
  41. data/spec/page_magic/drivers/selenium_spec.rb +2 -0
  42. data/spec/page_magic/drivers_spec.rb +2 -0
  43. data/spec/page_magic/element/locators_spec.rb +2 -0
  44. data/spec/page_magic/element/query_builder_spec.rb +7 -5
  45. data/spec/page_magic/element/query_spec.rb +6 -4
  46. data/spec/page_magic/element/selector_spec.rb +7 -5
  47. data/spec/page_magic/element_context_spec.rb +3 -1
  48. data/spec/page_magic/element_definition_builder_spec.rb +2 -0
  49. data/spec/page_magic/elements_spec.rb +9 -0
  50. data/spec/page_magic/instance_methods_spec.rb +2 -0
  51. data/spec/page_magic/matcher_spec.rb +3 -1
  52. data/spec/page_magic/session_methods_spec.rb +2 -0
  53. data/spec/page_magic/session_spec.rb +1 -1
  54. data/spec/page_magic/utils/string_spec.rb +2 -0
  55. data/spec/page_magic/wait_methods_spec.rb +5 -3
  56. data/spec/page_magic/watchers_spec.rb +2 -0
  57. data/spec/page_magic_spec.rb +5 -7
  58. data/spec/spec_helper.rb +3 -0
  59. data/spec/support/shared_contexts.rb +3 -1
  60. data/spec/support/shared_contexts/files_context.rb +2 -0
  61. data/spec/support/shared_contexts/nested_elements_html_context.rb +2 -0
  62. data/spec/support/shared_contexts/rack_application_context.rb +2 -0
  63. data/spec/support/shared_contexts/webapp_fixture_context.rb +2 -0
  64. data/spec/support/shared_examples.rb +2 -0
  65. data/spec/watcher_spec.rb +3 -0
  66. metadata +45 -29
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PageMagic
2
4
  shared_examples 'session accessor' do
3
5
  it 'includes session methods' do
data/spec/watcher_spec.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PageMagic
2
4
  describe Watcher do
3
5
  describe '#initialize' do
@@ -37,6 +39,7 @@ module PageMagic
37
39
  context 'block supplied to constructor' do
38
40
  def method_on_self(value = nil)
39
41
  return @value unless value
42
+
40
43
  @value = value
41
44
  end
42
45
 
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: page_magic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 2.0.0.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leon Davis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-03 00:00:00.000000000 Z
11
+ date: 2021-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activesupport-inflector
14
+ name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -30,70 +30,84 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '2.5'
33
+ version: '3.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '2.5'
40
+ version: '3.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: github-markup
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.4'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.4'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: jeweler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '2.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '2.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: redcarpet
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '3.3'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '3.3'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '0.34'
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '0.34'
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: ruby-debug-ide
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'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: yard
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +123,7 @@ dependencies:
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0.8'
111
125
  description: Framework for modeling and interacting with webpages which wraps capybara
112
- email: info@lad-tech.com
126
+ email: info@lvl-up.uk
113
127
  executables: []
114
128
  extensions: []
115
129
  extra_rdoc_files:
@@ -121,8 +135,11 @@ files:
121
135
  - ".rubocop.yml"
122
136
  - ".simplecov"
123
137
  - ".yardopts"
138
+ - ".zsh_config"
139
+ - Dockerfile
124
140
  - Gemfile
125
141
  - Gemfile.lock
142
+ - Makefile
126
143
  - README.md
127
144
  - Rakefile
128
145
  - VERSION
@@ -189,7 +206,7 @@ homepage: https://github.com/ladtech/page_magic
189
206
  licenses:
190
207
  - ruby
191
208
  metadata: {}
192
- post_install_message:
209
+ post_install_message:
193
210
  rdoc_options: []
194
211
  require_paths:
195
212
  - lib
@@ -200,13 +217,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
217
  version: '2.1'
201
218
  required_rubygems_version: !ruby/object:Gem::Requirement
202
219
  requirements:
203
- - - ">="
220
+ - - ">"
204
221
  - !ruby/object:Gem::Version
205
- version: '0'
222
+ version: 1.3.1
206
223
  requirements: []
207
- rubyforge_project:
208
- rubygems_version: 2.4.6
209
- signing_key:
224
+ rubygems_version: 3.1.4
225
+ signing_key:
210
226
  specification_version: 4
211
227
  summary: Framework for modeling and interacting with webpages
212
228
  test_files: []