cat_ipsum 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8b46019c58def4946840a41967de5a3d54237b53a0679c67b3e2997cbdab832d
4
+ data.tar.gz: 6011d062bddf71985325623d93f9f45e996b73bb55323e71ecf9657f362c81fb
5
+ SHA512:
6
+ metadata.gz: 1f346508c62350807facb060a4084ed75d85aa5e72a3fc27bee504a0e3a7c22b2bf1c2df3db967e799410d6673647b770036fd08571ed3dcf8fc56f90dca3c5d
7
+ data.tar.gz: ae75bbfc6b1c1d72fa6ab22735c6943dd74d142d2e14de65ddce875fbedcf2563e7494cafd0468f1552da4e96dbe912c95f696f2541448d53e863096424c0262
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,12 @@
1
+ Metrics/LineLength:
2
+ Max: 120
3
+
4
+ Style/Documentation:
5
+ Enabled: false
6
+
7
+ Style/GuardClause:
8
+ Exclude:
9
+ - cat_ipsum.gemspec
10
+
11
+ Style/FrozenStringLiteralComment:
12
+ Enabled: false
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,57 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cat_ipsum (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.0)
10
+ coderay (1.1.2)
11
+ diff-lcs (1.3)
12
+ jaro_winkler (1.5.2)
13
+ method_source (0.9.2)
14
+ parallel (1.17.0)
15
+ parser (2.6.3.0)
16
+ ast (~> 2.4.0)
17
+ pry (0.12.2)
18
+ coderay (~> 1.1.0)
19
+ method_source (~> 0.9.0)
20
+ rainbow (3.0.0)
21
+ rake (10.5.0)
22
+ rspec (3.8.0)
23
+ rspec-core (~> 3.8.0)
24
+ rspec-expectations (~> 3.8.0)
25
+ rspec-mocks (~> 3.8.0)
26
+ rspec-core (3.8.0)
27
+ rspec-support (~> 3.8.0)
28
+ rspec-expectations (3.8.3)
29
+ diff-lcs (>= 1.2.0, < 2.0)
30
+ rspec-support (~> 3.8.0)
31
+ rspec-mocks (3.8.0)
32
+ diff-lcs (>= 1.2.0, < 2.0)
33
+ rspec-support (~> 3.8.0)
34
+ rspec-support (3.8.0)
35
+ rubocop (0.71.0)
36
+ jaro_winkler (~> 1.5.1)
37
+ parallel (~> 1.10)
38
+ parser (>= 2.6)
39
+ rainbow (>= 2.2.2, < 4.0)
40
+ ruby-progressbar (~> 1.7)
41
+ unicode-display_width (>= 1.4.0, < 1.7)
42
+ ruby-progressbar (1.10.1)
43
+ unicode-display_width (1.6.0)
44
+
45
+ PLATFORMS
46
+ ruby
47
+
48
+ DEPENDENCIES
49
+ bundler (~> 2.0)
50
+ cat_ipsum!
51
+ pry
52
+ rake (~> 10.0)
53
+ rspec (~> 3.0)
54
+ rubocop
55
+
56
+ BUNDLED WITH
57
+ 2.0.1
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # CatIpsum
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cat_ipsum`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'cat_ipsum'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install cat_ipsum
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cat_ipsum.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'cat_ipsum'
5
+ require 'pry'
6
+
7
+ Pry.start
data/bin/setup ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
data/cat_ipsum.gemspec ADDED
@@ -0,0 +1,39 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'cat_ipsum/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'cat_ipsum'
7
+ spec.version = CatIpsum::VERSION
8
+ spec.authors = ['Vsevolod Voloshyn']
9
+ spec.email = ['seva.voloshin@gmail.com']
10
+
11
+ spec.summary = 'Generates random text about cats.'
12
+ spec.description = 'Another Lorem Ipsum version. With cats.'
13
+ spec.homepage = 'https://github.com/Volosh1n/cat_ipsum'
14
+
15
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
16
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
17
+ if spec.respond_to?(:metadata)
18
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
19
+ spec.metadata['homepage_uri'] = spec.homepage
20
+ spec.metadata['source_code_uri'] = 'https://github.com/Volosh1n/cat_ipsum'
21
+ else
22
+ raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
23
+ end
24
+
25
+ # Specify which files should be added to the gem when it is released.
26
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
27
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
28
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
29
+ end
30
+ spec.bindir = 'exe'
31
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
+ spec.require_paths = ['lib']
33
+
34
+ spec.add_development_dependency 'bundler', '~> 2.0'
35
+ spec.add_development_dependency 'pry'
36
+ spec.add_development_dependency 'rake', '~> 10.0'
37
+ spec.add_development_dependency 'rspec', '~> 3.0'
38
+ spec.add_development_dependency 'rubocop'
39
+ end
@@ -0,0 +1,53 @@
1
+ module CatIpsum
2
+ CAT_ACTIONS = [
3
+ 'all of a sudden',
4
+ 'attack feet',
5
+ 'behind the couch',
6
+ 'burrow under covers',
7
+ 'cat snacks',
8
+ 'chase imaginary bugs',
9
+ 'chase mice',
10
+ 'chew foot',
11
+ 'chew ipad power cord',
12
+ 'claw drapes',
13
+ 'climb leg',
14
+ 'destroy couch',
15
+ 'find something else more interesting',
16
+ 'flop over',
17
+ 'give attitude',
18
+ 'go crazy',
19
+ 'hate dog',
20
+ 'hide when guests come over',
21
+ 'hunt anything that moves',
22
+ 'ignore the human',
23
+ 'inspect anything brought into the house',
24
+ 'intently sniff hand',
25
+ 'intently stare at the same spot',
26
+ 'intrigued by the shower',
27
+ 'leave dead animals as gifts',
28
+ 'leave hair everywhere',
29
+ 'mark territory',
30
+ 'missing until dinner time',
31
+ 'nap all day',
32
+ 'or need to chase tail',
33
+ 'play time',
34
+ 'purr',
35
+ 'rub face on everything',
36
+ 'run in circles',
37
+ 'shake treat bag',
38
+ 'sleep on keyboard',
39
+ 'stand in doorway',
40
+ 'stand in front of the computer screen',
41
+ 'stare at ceiling',
42
+ 'stick butt in face',
43
+ 'stretch',
44
+ 'sun bathe',
45
+ 'swat at dog',
46
+ 'sweet beast',
47
+ 'throwup on your pillow',
48
+ 'under the bed',
49
+ 'use lap as chair',
50
+ 'why must they do that',
51
+ 'yawn so much'
52
+ ].freeze
53
+ end
@@ -0,0 +1,3 @@
1
+ module CatIpsum
2
+ VERSION = '0.1.0'.freeze
3
+ end
data/lib/cat_ipsum.rb ADDED
@@ -0,0 +1,26 @@
1
+ require 'cat_ipsum/version'
2
+ require 'cat_ipsum/cat_actions'
3
+
4
+ module CatIpsum
5
+ extend self
6
+
7
+ def sentence
8
+ Array.new(rand(1..5), CAT_ACTIONS.sample).join(', ').capitalize
9
+ end
10
+
11
+ alias phrase sentence
12
+
13
+ def sentences(sentence_count = 5)
14
+ (1..sentence_count).map { sentence }
15
+ end
16
+
17
+ alias phrases sentences
18
+
19
+ def paragraph
20
+ sentences.join('. ')
21
+ end
22
+
23
+ def paragraphs(paragraph_count = 5)
24
+ (1..paragraph_count).map { paragraph }
25
+ end
26
+ end
metadata ADDED
@@ -0,0 +1,129 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cat_ipsum
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Vsevolod Voloshyn
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-06-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Another Lorem Ipsum version. With cats.
84
+ email:
85
+ - seva.voloshin@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".rubocop.yml"
93
+ - Gemfile
94
+ - Gemfile.lock
95
+ - README.md
96
+ - Rakefile
97
+ - bin/console
98
+ - bin/setup
99
+ - cat_ipsum.gemspec
100
+ - lib/cat_ipsum.rb
101
+ - lib/cat_ipsum/cat_actions.rb
102
+ - lib/cat_ipsum/version.rb
103
+ homepage: https://github.com/Volosh1n/cat_ipsum
104
+ licenses: []
105
+ metadata:
106
+ allowed_push_host: https://rubygems.org
107
+ homepage_uri: https://github.com/Volosh1n/cat_ipsum
108
+ source_code_uri: https://github.com/Volosh1n/cat_ipsum
109
+ post_install_message:
110
+ rdoc_options: []
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ requirements: []
124
+ rubyforge_project:
125
+ rubygems_version: 2.7.7
126
+ signing_key:
127
+ specification_version: 4
128
+ summary: Generates random text about cats.
129
+ test_files: []