same_as 0.1.0 → 0.1.1
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 +8 -8
- data/CHANGELOG.md +18 -0
- data/README.md +11 -5
- data/lib/same_as/same_as.rb +2 -2
- data/lib/same_as/version.rb +1 -1
- metadata +3 -4
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
YzZlMGQ2YjBiYWM2N2YyNjQ0MDZlNTZlZjcyNDlkNWE2ZmIwZmQxNw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZmM1NWNlYTM3OTNjY2Y3MGFiOTFmZDJhOWIxMjJlYTY3OTcxNGExMg==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NDE3MDA1ZmRmMjczNTk0NmMzN2IyM2IxNzVlYjNhYjkxOTA5ZGVlMTE2ZjUx
|
|
10
|
+
MzBjOGI1ODA3OWVmMjhlNDE1MTU2YzBjOWNmMzcwZDBmZjUzMzdmZTc5MGVk
|
|
11
|
+
ZmM5YzYxZWE3MTk2NDM3MGQ2NWRjNGRhNjAxMzkzYzU4ZjBkMmE=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
YjFlYzIxYWRmZGY4YTlmMDA4YWM5NTQxYmUxYjg5MDg5MzdjMGE1ODk2NjZl
|
|
14
|
+
N2YxNjdhMDU5NGUxMWIxNGEyNTNhZmU5NTFkOGI5NTA3MzlmYmY5YjI5NGVh
|
|
15
|
+
MjQyMGJiMTE1OTc1ZWE4M2UyNGZkZWJhOGJjNzM4ZjlmNzFmYTM=
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## 0.1.1 (2016-01-12)
|
|
2
|
+
|
|
3
|
+
Features:
|
|
4
|
+
|
|
5
|
+
- removed bin directory (and scripts in there)
|
|
6
|
+
- added test script
|
|
7
|
+
|
|
8
|
+
Documentation:
|
|
9
|
+
|
|
10
|
+
- fixed description of same_prefix?
|
|
11
|
+
- added instruction about test
|
|
12
|
+
|
|
13
|
+
## 0.1.0 (2016-01-08)
|
|
14
|
+
|
|
15
|
+
Features:
|
|
16
|
+
|
|
17
|
+
- initial version
|
|
18
|
+
|
data/README.md
CHANGED
|
@@ -37,20 +37,26 @@ With no block, compares the elements using "==."
|
|
|
37
37
|
|
|
38
38
|
### same_prefix?(other_ary)
|
|
39
39
|
|
|
40
|
-
Returns true if
|
|
41
|
-
|
|
40
|
+
Returns true if either of each corresponding strings in self and the other array
|
|
41
|
+
includes the other from the first character.
|
|
42
42
|
Returns false if otherwise.
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
## Development
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
### Test
|
|
48
|
+
|
|
49
|
+
Run the test script in test directory.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
$ cd test
|
|
53
|
+
$ ruby test_same_as.rb
|
|
54
|
+
```
|
|
48
55
|
|
|
49
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
50
56
|
|
|
51
57
|
## Contributing
|
|
52
58
|
|
|
53
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
59
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/hashimoton/same_as. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
54
60
|
|
|
55
61
|
|
|
56
62
|
## License
|
data/lib/same_as/same_as.rb
CHANGED
|
@@ -22,8 +22,8 @@ module SameAs
|
|
|
22
22
|
return is_same_as
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
# Returns true if
|
|
26
|
-
#
|
|
25
|
+
# Returns true if either of each corresponding strings in self and the other array
|
|
26
|
+
# includes the other from the first character.
|
|
27
27
|
# Returns false if otherwise.
|
|
28
28
|
def same_prefix?(other_ary)
|
|
29
29
|
return self.same_as?(other_ary) {|a, b| a.start_with?(b) || b.start_with?(a)}
|
data/lib/same_as/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: same_as
|
|
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
|
- hashimoton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-01-
|
|
11
|
+
date: 2016-01-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -46,13 +46,12 @@ extensions: []
|
|
|
46
46
|
extra_rdoc_files: []
|
|
47
47
|
files:
|
|
48
48
|
- .gitignore
|
|
49
|
+
- CHANGELOG.md
|
|
49
50
|
- CODE_OF_CONDUCT.md
|
|
50
51
|
- Gemfile
|
|
51
52
|
- LICENSE.txt
|
|
52
53
|
- README.md
|
|
53
54
|
- Rakefile
|
|
54
|
-
- bin/console
|
|
55
|
-
- bin/setup
|
|
56
55
|
- lib/same_as.rb
|
|
57
56
|
- lib/same_as/array.rb
|
|
58
57
|
- lib/same_as/same_as.rb
|
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require "bundler/setup"
|
|
4
|
-
require "same_as"
|
|
5
|
-
|
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
-
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
-
# require "pry"
|
|
11
|
-
# Pry.start
|
|
12
|
-
|
|
13
|
-
require "irb"
|
|
14
|
-
IRB.start
|