reserved_words 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 +4 -4
- data/README.md +3 -0
- data/circle.yml +1 -0
- data/lib/reserved_words.rb +2 -1
- data/lib/reserved_words/version.rb +1 -1
- data/reserved_words.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eeb0c77ec59c861fa9ad2d0b436936050cf7026e
|
4
|
+
data.tar.gz: e896ae32298635fc7f7eb73d3b0e604e9f24a6a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e8e3f6c9a72447ed1426ea87aacd17584e32b6d3b2f2ab0c967c927aa605380c7491fa66f794328786c773db64fba731e2f679a478586ed90c9cede794ff85a
|
7
|
+
data.tar.gz: dd28ee7b1443de57b7dee2e77eb970c6309348b58099806daf1208d427c6482d118c6796c3e7412a955f9f40019e88cfbc251f235a36ea1919f0adacaba0a041
|
data/README.md
CHANGED
@@ -32,6 +32,9 @@ Add your own word
|
|
32
32
|
```ruby
|
33
33
|
[1] pry(main)> ReservedWords.add('blog')
|
34
34
|
=> ["admin", "api", "blog", "image", "rss", "www"]
|
35
|
+
|
36
|
+
[1] pry(main)> ReservedWords.add(['blog', 'public'])
|
37
|
+
=> ["admin", "api", "blog", "image", "public", "rss", "www"]
|
35
38
|
```
|
36
39
|
|
37
40
|
Remove word
|
data/circle.yml
CHANGED
data/lib/reserved_words.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'active_support/core_ext/array'
|
1
2
|
require 'reserved_words/version'
|
2
3
|
|
3
4
|
module ReservedWords
|
@@ -10,7 +11,7 @@ module ReservedWords
|
|
10
11
|
end
|
11
12
|
|
12
13
|
def self.add(word)
|
13
|
-
@reserved_words.
|
14
|
+
@reserved_words.concat(Array.wrap(word)).sort!
|
14
15
|
end
|
15
16
|
|
16
17
|
def self.remove(word)
|
data/reserved_words.gemspec
CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
17
|
spec.require_paths = ['lib']
|
18
18
|
|
19
|
+
spec.add_dependency 'activesupport'
|
19
20
|
spec.add_development_dependency 'bundler', '~> 1.9'
|
20
21
|
spec.add_development_dependency 'rake', '~> 10.0'
|
21
22
|
spec.add_development_dependency 'rspec', '~> 3.2'
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reserved_words
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Ihara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
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'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|