gamera 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d29d6d4e95bf5e135207da60348335d57222a9f7
4
- data.tar.gz: 5683e84460a435af4064b8ccad81d1b9bce5e94a
3
+ metadata.gz: b1514c6ae476cacccdbbda467f5dfad23badcf65
4
+ data.tar.gz: e2a5a09b08486c2cdbe6c3708933edb8ae4ca328
5
5
  SHA512:
6
- metadata.gz: 470dfd5eb20da925756dde157ece188591f79c88d970be027fe09eae6b6e4c8ec2274009bddec6ffc9bc030cd77a7b5a3bc14fd0d0ac583d9b3489c71ea71781
7
- data.tar.gz: 47ea840fded49015681334783916f714d8aed8984690fc50dea6c9729d3480a7ef01fbaf0c3e3d5fefbeeda0aca8f595d7011079c569c5f6d438dea9092b784a
6
+ metadata.gz: 9da7b5a27ad9ce0ccd429f9e7b9da223d5aec1f7875f169539f1dd6bc8c639c2b6e83fbb2c554553b631d35c4162163e8bef15c702319c139d8e9b29c8995615
7
+ data.tar.gz: 2faecf839d93d833cdadf7e558afbd6bfdcbb9c164841863a58ad518e2f52af869b2d52f1b8a948078d9002eec3e56523d6a20d7737f4691e070b690aacb664f
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- �u%,�E�2l�V���s����"U��s}������r���ƣu�(��c��쒦��IE��8�αtߏ���-7��� �P����΃QG�iC߶6v� ��ܑ�JK���p���I�ꨌu4�r��+R�渾��Հ']kq���gO/�����Ms��>��|�������� ����R%��>O���T�uCE�M� �E��'H��XP����n?�1��wϼn/H*� (�qS}�UD9�k�@ �tT1o��&��
1
+ ��'�>����$+�s{IoM�K�H
@@ -136,7 +136,7 @@ module Gamera
136
136
 
137
137
  def initialize(url, url_matcher = nil)
138
138
  @url = url
139
- @url_matcher = url_matcher
139
+ @url_matcher = url_matcher || /#{url}/
140
140
  end
141
141
 
142
142
  # Open the page url in the browser specified in your Capybara configuration
@@ -143,6 +143,15 @@ module Gamera
143
143
  page.has_selector?(row_css, text: name)
144
144
  end
145
145
 
146
+ # Checks for the absence of a row with the given name
147
+ #
148
+ # @param name [String] The name to look for in the table's specified name column.
149
+ # @return [Boolean] False if a row with the specified name is found, true
150
+ # otherwise
151
+ def has_no_row?(name)
152
+ page.has_no_selector?(row_css, text: name)
153
+ end
154
+
146
155
  # Checks to see if the table has any rows
147
156
  #
148
157
  # @return [Boolean] True if the row selector is found, false otherwise
@@ -150,6 +159,13 @@ module Gamera
150
159
  has_selector?(row_css)
151
160
  end
152
161
 
162
+ # Checks to see if the table has no rows
163
+ #
164
+ # @return [Boolean] False if the row selector is found, true otherwise
165
+ def has_no_rows?
166
+ has_no_selector?(row_css)
167
+ end
168
+
153
169
  # Delete all of the rows from the table
154
170
  def delete_all_rows
155
171
  while has_rows?
@@ -179,7 +195,9 @@ module Gamera
179
195
  plural_row_name = @plural_row_name
180
196
  rows_name = plural_row_name ? plural_row_name.to_sym : "#{row_name}s".to_sym
181
197
  has_row_name = "has_#{row_name}?".to_sym
198
+ has_no_row_name = "has_no_#{row_name}?".to_sym
182
199
  has_rows_name = plural_row_name ? "has_#{plural_row_name}?".to_sym : "has_#{row_name}s?".to_sym
200
+ has_no_rows_name = plural_row_name ? "has_no_#{plural_row_name}?".to_sym : "has_no_#{row_name}s?".to_sym
183
201
  delete_all_rows_name = plural_row_name ? "delete_all_#{plural_row_name}".to_sym : "delete_all_#{row_name}s".to_sym
184
202
  delete_row_name = "delete_#{row_name}".to_sym
185
203
  edit_row_name = "edit_#{row_name}".to_sym
@@ -187,7 +205,9 @@ module Gamera
187
205
  self.class.instance_eval do
188
206
  alias_method rows_name, :rows
189
207
  alias_method has_row_name, :has_row?
208
+ alias_method has_no_row_name, :has_no_row?
190
209
  alias_method has_rows_name, :has_rows?
210
+ alias_method has_no_rows_name, :has_no_rows?
191
211
  alias_method delete_all_rows_name, :delete_all_rows
192
212
  alias_method delete_row_name, :delete_row
193
213
  alias_method edit_row_name, :edit_row
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gamera
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dobbs
@@ -32,28 +32,8 @@ cert_chain:
32
32
  464gGOxiLBQhgi5LrYOx/4oHzyd9o7ZEC/rFUw6RlYq/Zy91Y68MQG3R4q54FSDr
33
33
  JCSrp1wI+0CJRVpPuS6W3r3h8/lBfq6wPTmg3MzlDTDYHTnh7poY3EqC6x7+xA==
34
34
  -----END CERTIFICATE-----
35
- date: 2015-06-15 00:00:00.000000000 Z
35
+ date: 2015-11-05 00:00:00.000000000 Z
36
36
  dependencies:
37
- - !ruby/object:Gem::Dependency
38
- name: rspec
39
- requirement: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '3.1'
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 3.1.0
47
- type: :runtime
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '3.1'
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: 3.1.0
57
37
  - !ruby/object:Gem::Dependency
58
38
  name: sinatra
59
39
  requirement: !ruby/object:Gem::Requirement
@@ -234,6 +214,26 @@ dependencies:
234
214
  - - ">="
235
215
  - !ruby/object:Gem::Version
236
216
  version: 5.0.0
217
+ - !ruby/object:Gem::Dependency
218
+ name: rspec
219
+ requirement: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - "~>"
222
+ - !ruby/object:Gem::Version
223
+ version: '3.1'
224
+ - - ">="
225
+ - !ruby/object:Gem::Version
226
+ version: 3.1.0
227
+ type: :development
228
+ prerelease: false
229
+ version_requirements: !ruby/object:Gem::Requirement
230
+ requirements:
231
+ - - "~>"
232
+ - !ruby/object:Gem::Version
233
+ version: '3.1'
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: 3.1.0
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: yard
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -303,9 +303,9 @@ require_paths:
303
303
  - lib
304
304
  required_ruby_version: !ruby/object:Gem::Requirement
305
305
  requirements:
306
- - - ">="
306
+ - - "~>"
307
307
  - !ruby/object:Gem::Version
308
- version: '0'
308
+ version: 2.1.0
309
309
  required_rubygems_version: !ruby/object:Gem::Requirement
310
310
  requirements:
311
311
  - - ">="
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- u��v��lᤨ�0���Gm����/Gn����FCP}Y&���wx���$�2�����&J�?��"��S<�/�+�ۈ`Z���i)b4�=�c\�^R���|@\�o� ,wsZ������x~+��W�A�n���Nqf�(��i.��X���'X�P���4�X�Q�>
2
- �^)��v=LrnPF(k��O ��ȋN�Va� �/i�i4f{�������� �D���T�'1,�>p�4:�� ê�;�
1
+ H�pDخ �#�y5\����̓