petname 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ module PetName
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'petname/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "petname"
8
+ spec.version = PetName::VERSION
9
+ spec.authors = ["polamjag"]
10
+ spec.email = ["s@polamjag.info"]
11
+ spec.summary = %q{Generates random words consisting of a random combination of an adverb, adjective, and proper name}
12
+ spec.description = %q{Generates random words consisting of a random combination of an adverb, adjective, and proper name. Ported from https://github.com/dustinkirkland/petname}
13
+ spec.homepage = "https://github.com/polamjag/petname-ruby"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
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 = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency "pry"
25
+ end
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+
3
+ describe PetName do
4
+ it 'has a version number' do
5
+ expect(PetName::VERSION).not_to be nil
6
+ end
7
+
8
+ describe PetName::Generator do
9
+ let(:pn) { PetName::Generator.new }
10
+
11
+ it "should generate random Petname without arguments" do
12
+ expect( pn.generate ).to match /[a-z]*-[a-z]*/
13
+ end
14
+
15
+ it "should use specified separator" do
16
+ expect( pn.generate separator: "===" ).to match /[a-z]*===[a-z]*/
17
+ end
18
+
19
+ it "should follow specified number of words" do
20
+ expect( pn.generate words: 10 ).to match /([a-z]*-){9}[a-z]*/
21
+ end
22
+
23
+ it "works with all assigned args" do
24
+ expect( pn.generate separator: "🍣", words: 4 ).to match /([a-z]*🍣)*[a-z]/
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'petname'
metadata ADDED
@@ -0,0 +1,121 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: petname
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - polamjag
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-30 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: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Generates random words consisting of a random combination of an adverb,
70
+ adjective, and proper name. Ported from https://github.com/dustinkirkland/petname
71
+ email:
72
+ - s@polamjag.info
73
+ executables: []
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - ".gitignore"
78
+ - ".rspec"
79
+ - ".travis.yml"
80
+ - Gemfile
81
+ - LICENSE.txt
82
+ - README.md
83
+ - Rakefile
84
+ - lib/petname.rb
85
+ - lib/petname/adjectives.txt
86
+ - lib/petname/adverbs.txt
87
+ - lib/petname/generator.rb
88
+ - lib/petname/names.txt
89
+ - lib/petname/version.rb
90
+ - petname.gemspec
91
+ - spec/petname_spec.rb
92
+ - spec/spec_helper.rb
93
+ homepage: https://github.com/polamjag/petname-ruby
94
+ licenses:
95
+ - MIT
96
+ metadata: {}
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 2.4.5
114
+ signing_key:
115
+ specification_version: 4
116
+ summary: Generates random words consisting of a random combination of an adverb, adjective,
117
+ and proper name
118
+ test_files:
119
+ - spec/petname_spec.rb
120
+ - spec/spec_helper.rb
121
+ has_rdoc: