greenenvy 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: ef6e6a05847bc6b1ddc07008875c81ee8d18e28266efe4b77dad7ed072e14dfc
4
- data.tar.gz: 69465094b55506dc57e17587aed0fd1f5b3cb36370945a163c76450a8b964a98
3
+ metadata.gz: c44d7ffe342cc58db10ea5d8a2ade17f2607bec6ef51362e08979ec1ca86e64b
4
+ data.tar.gz: 9ea1723669d2111ac53c01ae68729451f32b0a898b4801abe547ef6aa9e1a01a
5
5
  SHA512:
6
- metadata.gz: 3ad5ac56fe219b61300ecc20e2bb978908cc3ef7522e2456ccaa442be06fada9af40d16ee1d9d7feedfdb69a4e4ad9e2bbd3132ab893ff9e85356c7285ed8580
7
- data.tar.gz: 671d36ea27656ffe82c9430aa82f3b5f6e49d4aa5e1032a5eee85859615e0d9b0fb8e446a9d1b32a7a7e9489403a3859e068c6dff3a5ffd5be3d007c3f958f57
6
+ metadata.gz: a7773d0521273e17a293b0869b74ac8976e896bb54a95a76ac3aba987e8310222bbd589de5092b51c518cf0eec617415279c57b6c2c7150628f6db7df0c6e719
7
+ data.tar.gz: da063579e5110454fc0d8cffe812396a67b90929e989794eab879b65d1af8a9fa72d869d79acf8f721f5e16b8246314fdeab339250f8ce0e35486b58be36715a
data/.gitignore CHANGED
@@ -6,3 +6,5 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+
10
+ Gemfile.lock
@@ -17,6 +17,8 @@ module Greenenvy
17
17
  :inspect,
18
18
  ].freeze
19
19
 
20
+ REGEXP = %r{\A[A-Za-z]+\w+\z}.freeze
21
+
20
22
  def valid?(name)
21
23
  name = name.to_s
22
24
  !reserved_method?(name) && valid_pattern?(name)
@@ -28,8 +30,14 @@ module Greenenvy
28
30
  BASIC_OBJECT_METHODS.include?(name)
29
31
  end
30
32
 
31
- def valid_pattern?(name)
32
- %r{\A[A-Za-z]+\w+\z}.match?(name)
33
+ if String.instance_methods.include?(:match?)
34
+ def valid_pattern?(name)
35
+ REGEXP.match?(name)
36
+ end
37
+ else
38
+ def valid_pattern?(name)
39
+ name =~ REGEXP ? true : false
40
+ end
33
41
  end
34
42
  end
35
43
  end
@@ -1,3 +1,3 @@
1
1
  module Greenenvy
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greenenvy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Gibralter
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-02 00:00:00.000000000 Z
11
+ date: 2018-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -64,7 +64,6 @@ files:
64
64
  - ".travis.yml"
65
65
  - CODE_OF_CONDUCT.md
66
66
  - Gemfile
67
- - Gemfile.lock
68
67
  - LICENSE
69
68
  - LICENSE.txt
70
69
  - README.md
data/Gemfile.lock DELETED
@@ -1,22 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- greenenvy (0.1.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- minitest (5.11.3)
10
- rake (10.5.0)
11
-
12
- PLATFORMS
13
- ruby
14
-
15
- DEPENDENCIES
16
- bundler (~> 1.16)
17
- greenenvy!
18
- minitest (~> 5.0)
19
- rake (~> 10.0)
20
-
21
- BUNDLED WITH
22
- 1.16.1