fish 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e554ff7edea97e52629ae166a26c20805fb8204a
4
- data.tar.gz: 7ed3c27018396cd74e8e60ad6bf9dbe31480a427
3
+ metadata.gz: c2f95fbb760741d5bb904db91f62463f91402aca
4
+ data.tar.gz: ef0ab8a52eda32f07d1abff3e3e5fea8ad69901b
5
5
  SHA512:
6
- metadata.gz: 1e43ee548644a74ba716dfb649cf988d5135bfb7edb976e80b522941a032c82ccf62bdb0a896bd3dabdab365eb4994abe142af44d5cf7fda399aecce98512618
7
- data.tar.gz: bc830ce65d19975b1c42d6d4058c6daeedd7c82665aee51dc599db26d8d433189a96ccc7b873eb5bdfabffe09300558b9606ee342563aa7c55b8fc1ef3041d2c
6
+ metadata.gz: d8df0ed7067c5d6d37b94ee67b4abd588b541f512660224c95e591d38bd5bd51d1ae543c35fe12cd5b7422c10bf59ca536b59a15b6c8cd4d312b5421ceaf3427
7
+ data.tar.gz: 8b2077441abe62abe803a732a2260acff165685f5479040ac09327258079f4f75cde92e49902da0fda3ccfa02a342f0c725b3a9d690dda41d258dd8f5b862586
data/.gitignore CHANGED
@@ -1,17 +1,17 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
@@ -1,23 +1,23 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'Fish/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = 'fish'
8
- spec.version = Fish::VERSION
9
- spec.authors = %w(walru5)
10
- spec.email = %w(whitepoizon@gmail.com)
11
- spec.description = 'A gem for printing ascii fish'
12
- spec.summary = 'A gem for printing ascii fish'
13
- spec.homepage = 'https://github.com/walru5/Fish'
14
- spec.license = 'MIT'
15
-
16
- spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = %w(lib)
20
-
21
- spec.add_development_dependency 'bundler', '~> 1.3'
22
- spec.add_development_dependency 'rake'
23
- end
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'Fish/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'fish'
8
+ spec.version = Fish::VERSION
9
+ spec.authors = %w(walru5)
10
+ spec.email = %w(whitepoizon@gmail.com)
11
+ spec.description = 'A gem for printing ascii fish'
12
+ spec.summary = 'Did you ever want to have ASCII-fish in your application, but you are too lazy to make them yourself? This gem does the job for you.'
13
+ spec.homepage = 'https://github.com/walru5/fish'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = %w(lib)
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.3'
22
+ spec.add_development_dependency 'rake'
23
+ end
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
- source 'https://rubygems.org'
2
-
3
- group :development do
4
- gem 'rspec'
5
- gem 'rspec-core'
6
- end
7
-
8
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ group :development do
4
+ gem 'rspec'
5
+ gem 'rspec-core'
6
+ end
7
+
8
+ gemspec
@@ -1,20 +1,20 @@
1
- MIT License
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1
+ MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,32 +1,38 @@
1
- # Fish
2
-
3
- ## Installation
4
-
5
- Add this line to your application's Gemfile:
6
-
7
- gem 'fish'
8
-
9
- And then execute:
10
-
11
- $ bundle
12
-
13
- Or install it yourself as:
14
-
15
- $ gem install fish
16
-
17
- ## Usage
18
-
19
- Fish.fish # '><(((°>'
20
- Fish.fish(5) # '><(((((°>'
21
- Fish.fish(3, false) # '<°)))><'
22
- Fish.many_fish(3, 3, false) # ['<°)))><', '<°)))><', '<°)))><']
23
- Fish.random_fish # returns random fish
24
- Fish.is_fish?('<°)))><') # true
25
-
26
- ## Contributing
27
-
28
- 1. Fork it
29
- 2. Create your feature branch (`git checkout -b my-new-feature`)
30
- 3. Commit your changes (`git commit -am 'Add some feature'`)
31
- 4. Push to the branch (`git push origin my-new-feature`)
32
- 5. Create new Pull Request
1
+ # Fish
2
+
3
+ Did you ever want to have ASCII-fish in your application, but you are too lazy to make them yourself?
4
+ This gem does the job for you.
5
+
6
+ Fish is inspired by the gem 'dicks'.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ gem 'fish'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install fish
21
+
22
+ ## Usage
23
+
24
+ Fish.fish # '><(((°>'
25
+ Fish.fish(5) # '><(((((°>'
26
+ Fish.fish(3, false) # '<°)))><'
27
+ Fish.many_fish(3, 3, false) # ['<°)))><', '<°)))><', '<°)))><']
28
+ Fish.random_fish # returns random fish
29
+ Fish.many_random_fish(3) # return an array of 3 random fish
30
+ Fish.is_fish?('<°)))><') # true
31
+
32
+ ## Contributing
33
+
34
+ 1. Fork it
35
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
36
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
37
+ 4. Push to the branch (`git push origin my-new-feature`)
38
+ 5. Create new Pull Request
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require "bundler/gem_tasks"
@@ -1,34 +1,34 @@
1
- require 'Fish/version'
2
-
3
- module Fish
4
- def self.fish(len = 3, looks_right = true)
5
- if looks_right
6
- "><#{'(' * len}°>"
7
- else
8
- "<°#{')' * len}><"
9
- end
10
- end
11
-
12
- def self.many_fish(num, len = 3, looks_right = true)
13
- a = []
14
- num.times {a << fish(len, looks_right)}
15
- return a
16
- end
17
-
18
- def self.is_fish?(str)
19
- ret = false
20
- ret = true if str.match(/><\(+°>/) != nil
21
- ret = true if str.match(/<°\)+></) != nil
22
- return ret
23
- end
24
-
25
- def self.random_fish(max_len = 10)
26
- fish(1 + rand(max_len), rand(2) == 1)
27
- end
28
-
29
- def self.many_random_fish(num, max_len = 10)
30
- a = []
31
- num.times {a << random_fish(max_len)}
32
- return a
33
- end
1
+ require 'Fish/version'
2
+
3
+ module Fish
4
+ def self.fish(len = 3, looks_right = true)
5
+ if looks_right
6
+ "><#{'(' * len}°>"
7
+ else
8
+ "<°#{')' * len}><"
9
+ end
10
+ end
11
+
12
+ def self.many_fish(num, len = 3, looks_right = true)
13
+ a = []
14
+ num.times {a << fish(len, looks_right)}
15
+ return a
16
+ end
17
+
18
+ def self.is_fish?(str)
19
+ ret = false
20
+ ret = true if str.match(/><\(+°>/) != nil
21
+ ret = true if str.match(/<°\)+></) != nil
22
+ return ret
23
+ end
24
+
25
+ def self.random_fish(max_len = 10)
26
+ fish(1 + rand(max_len), rand(2) == 1)
27
+ end
28
+
29
+ def self.many_random_fish(num, max_len = 10)
30
+ a = []
31
+ num.times {a << random_fish(max_len)}
32
+ return a
33
+ end
34
34
  end
@@ -1,3 +1,3 @@
1
1
  module Fish
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -1,5 +1,5 @@
1
1
  require 'rspec'
2
- require_relative '../lib/Fish'
2
+ require_relative '../lib/fish'
3
3
 
4
4
  describe Fish do
5
5
  it 'should return a fish with 3 length' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - walru5
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-15 00:00:00.000000000 Z
11
+ date: 2013-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -54,7 +54,7 @@ files:
54
54
  - lib/Fish.rb
55
55
  - lib/Fish/version.rb
56
56
  - test/fish_spec.rb
57
- homepage: https://github.com/walru5/Fish
57
+ homepage: https://github.com/walru5/fish
58
58
  licenses:
59
59
  - MIT
60
60
  metadata: {}
@@ -77,6 +77,7 @@ rubyforge_project:
77
77
  rubygems_version: 2.0.2
78
78
  signing_key:
79
79
  specification_version: 4
80
- summary: A gem for printing ascii fish
80
+ summary: Did you ever want to have ASCII-fish in your application, but you are too
81
+ lazy to make them yourself? This gem does the job for you.
81
82
  test_files:
82
83
  - test/fish_spec.rb