magician 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.travis.yml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile +2 -12
- data/LICENSE.txt +2 -0
- data/README.md +24 -24
- data/Rakefile +3 -36
- data/lib/magician/version.rb +4 -0
- data/magician.gemspec +23 -75
- data/spec/array_spec.rb +1 -1
- data/spec/integer_spec.rb +1 -1
- data/spec/magician_spec.rb +9 -0
- data/spec/math_spec.rb +1 -1
- data/spec/numeric_spec.rb +1 -1
- data/spec/random_spec.rb +1 -1
- data/spec/shortcuts_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -13
- metadata +41 -47
- data/VERSION +0 -1
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 86536c20e15c7e737866f39ec084f18f123f450c
|
4
|
+
data.tar.gz: fb74dd1d12fc73ca82e68600737282cbf9befeee
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2fe939b855d6cbefcdd3339472418b66b6a0746fe5071b9e0694fbbd821562f82cc41a0ffddb15cf5691c0aabf6d76ce40893e13aa0d58699bd03410f5026f95
|
7
|
+
data.tar.gz: fed9a0072f5e43cbd8e34fcf0c653f2807ea9fd965173a138edd3f102e8db2c6fbfd05698332339869482a8cbd9d83cde8c002ce875db32a30186d5452cac8f2
|
data/.gitignore
ADDED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -1,14 +1,4 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
#
|
4
|
-
|
5
|
-
# Add dependencies to develop your gem here.
|
6
|
-
# Include everything needed to run rake, tests, features, etc.
|
7
|
-
group :development do
|
8
|
-
gem 'rspec', '~> 2.13'
|
9
|
-
gem 'yard', '~> 0.7'
|
10
|
-
gem 'rdoc', '~> 4.0'
|
11
|
-
gem 'bundler', '~> 1.2'
|
12
|
-
gem 'jeweler', '~> 1.8'
|
13
|
-
gem 'simplecov', '~> 0.7'
|
14
|
-
end
|
3
|
+
# Specify your gem's dependencies in magician.gemspec
|
4
|
+
gemspec
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,15 +1,25 @@
|
|
1
|
-
#
|
1
|
+
# Magician
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/magician.png)](http://badge.fury.io/rb/magician)
|
3
|
+
[![Build Status](https://secure.travis-ci.org/thenickperson/magician.png?branch=master)](http://travis-ci.org/thenickperson/magician)
|
4
|
+
[![Dependency Status](https://gemnasium.com/thenickperson/magician.png)](https://gemnasium.com/thenickperson/magician)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/thenickperson/magician.png)](https://codeclimate.com/github/thenickperson/magician)
|
2
6
|
|
3
7
|
A suite of handy methods for doing calculations in irb.
|
4
8
|
|
5
|
-
##
|
9
|
+
## Installation
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
gem 'magician'
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
6
17
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
feel free to send me a pull request.
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install magician
|
21
|
+
|
22
|
+
## [Documentation](http://rubydoc.info/github/thenickperson/magician/frames)
|
13
23
|
|
14
24
|
## Examples
|
15
25
|
```ruby
|
@@ -41,19 +51,9 @@ feel free to send me a pull request.
|
|
41
51
|
=> true
|
42
52
|
```
|
43
53
|
|
44
|
-
## Contributing
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
- Start a feature/bugfix branch.
|
51
|
-
- Commit and push until you are happy with your contribution.
|
52
|
-
- Make sure to add tests for it. This is important so I don't break it in a
|
53
|
-
future version unintentionally.
|
54
|
-
- Please try not to mess with the Rakefile, version, or history. If you want to
|
55
|
-
have your own version, or is otherwise necessary, that is fine, but please
|
56
|
-
isolate to its own commit so I can cherry-pick around it.
|
57
|
-
|
58
|
-
## Copyright
|
59
|
-
Copyright (c) 2013 Nicolas McCurdy. See LICENSE.txt for further details.
|
54
|
+
## Contributing
|
55
|
+
1. Fork it
|
56
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
57
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
58
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
59
|
+
5. Create new Pull Request
|
data/Rakefile
CHANGED
@@ -1,40 +1,7 @@
|
|
1
|
-
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rspec/core/rake_task"
|
2
3
|
|
3
|
-
|
4
|
-
require 'bundler'
|
5
|
-
begin
|
6
|
-
Bundler.setup(:default, :development)
|
7
|
-
rescue Bundler::BundlerError => e
|
8
|
-
$stderr.puts e.message
|
9
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
-
exit e.status_code
|
11
|
-
end
|
12
|
-
require 'rake'
|
13
|
-
|
14
|
-
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
-
gem.name = "magician"
|
18
|
-
gem.homepage = "http://github.com/thenickperson/magician"
|
19
|
-
gem.license = "MIT"
|
20
|
-
gem.summary = "A suite of handy methods for doing calculations in irb."
|
21
|
-
gem.description = "A suite of handy methods for doing calculations in irb."
|
22
|
-
gem.email = "thenickperson@gmail.com"
|
23
|
-
gem.authors = ["Nicolas McCurdy"]
|
24
|
-
# dependencies defined in Gemfile
|
25
|
-
end
|
26
|
-
Jeweler::RubygemsDotOrgTasks.new
|
27
|
-
|
28
|
-
require 'rspec/core'
|
29
|
-
require 'rspec/core/rake_task'
|
30
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
-
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
-
end
|
33
|
-
|
34
|
-
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
-
spec.rcov = true
|
37
|
-
end
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
38
5
|
|
39
6
|
task :default => :spec
|
40
7
|
|
data/magician.gemspec
CHANGED
@@ -1,80 +1,28 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'magician/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "magician"
|
8
|
+
spec.version = Magician::VERSION
|
9
|
+
spec.authors = ["Nicolas McCurdy"]
|
10
|
+
spec.email = ["thenickperson@gmail.com"]
|
11
|
+
spec.description = "A suite of handy methods for doing calculations in irb."
|
12
|
+
spec.summary = "A suite of handy methods for doing calculations in irb."
|
13
|
+
spec.homepage = "http://github.com/thenickperson/magician"
|
14
|
+
spec.license = "MIT"
|
9
15
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
s.email = "thenickperson@gmail.com"
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE.txt",
|
17
|
-
"README.md"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".rspec",
|
22
|
-
".travis.yml",
|
23
|
-
"CHANGELOG.md",
|
24
|
-
"Gemfile",
|
25
|
-
"LICENSE.txt",
|
26
|
-
"README.md",
|
27
|
-
"Rakefile",
|
28
|
-
"VERSION",
|
29
|
-
"lib/magician.rb",
|
30
|
-
"lib/magician/array.rb",
|
31
|
-
"lib/magician/integer.rb",
|
32
|
-
"lib/magician/math.rb",
|
33
|
-
"lib/magician/numeric.rb",
|
34
|
-
"lib/magician/random.rb",
|
35
|
-
"lib/magician/shortcuts.rb",
|
36
|
-
"lib/magician/string.rb",
|
37
|
-
"magician.gemspec",
|
38
|
-
"spec/array_spec.rb",
|
39
|
-
"spec/integer_spec.rb",
|
40
|
-
"spec/math_spec.rb",
|
41
|
-
"spec/numeric_spec.rb",
|
42
|
-
"spec/random_spec.rb",
|
43
|
-
"spec/shortcuts_spec.rb",
|
44
|
-
"spec/spec_helper.rb",
|
45
|
-
"spec/string_spec.rb"
|
46
|
-
]
|
47
|
-
s.homepage = "http://github.com/thenickperson/magician"
|
48
|
-
s.licenses = ["MIT"]
|
49
|
-
s.require_paths = ["lib"]
|
50
|
-
s.rubygems_version = "1.8.23"
|
51
|
-
s.summary = "A suite of handy methods for doing calculations in irb."
|
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 = ["lib"]
|
52
20
|
|
53
|
-
|
54
|
-
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec", "~> 2.13"
|
55
24
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
|
60
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.2"])
|
61
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.8"])
|
62
|
-
s.add_development_dependency(%q<simplecov>, ["~> 0.7"])
|
63
|
-
else
|
64
|
-
s.add_dependency(%q<rspec>, ["~> 2.13"])
|
65
|
-
s.add_dependency(%q<yard>, ["~> 0.7"])
|
66
|
-
s.add_dependency(%q<rdoc>, ["~> 4.0"])
|
67
|
-
s.add_dependency(%q<bundler>, ["~> 1.2"])
|
68
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8"])
|
69
|
-
s.add_dependency(%q<simplecov>, ["~> 0.7"])
|
70
|
-
end
|
71
|
-
else
|
72
|
-
s.add_dependency(%q<rspec>, ["~> 2.13"])
|
73
|
-
s.add_dependency(%q<yard>, ["~> 0.7"])
|
74
|
-
s.add_dependency(%q<rdoc>, ["~> 4.0"])
|
75
|
-
s.add_dependency(%q<bundler>, ["~> 1.2"])
|
76
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8"])
|
77
|
-
s.add_dependency(%q<simplecov>, ["~> 0.7"])
|
78
|
-
end
|
25
|
+
spec.add_development_dependency "yard", "~> 0.7"
|
26
|
+
spec.add_development_dependency "rdoc", "~> 4.0"
|
27
|
+
spec.add_development_dependency "simplecov", "~> 0.7"
|
79
28
|
end
|
80
|
-
|
data/spec/array_spec.rb
CHANGED
data/spec/integer_spec.rb
CHANGED
data/spec/math_spec.rb
CHANGED
data/spec/numeric_spec.rb
CHANGED
data/spec/random_spec.rb
CHANGED
data/spec/shortcuts_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -2,17 +2,5 @@
|
|
2
2
|
require 'simplecov'
|
3
3
|
SimpleCov.start { add_filter '/spec/' }
|
4
4
|
|
5
|
-
|
6
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
7
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
8
|
-
require 'rspec'
|
5
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
9
6
|
require 'magician'
|
10
|
-
|
11
|
-
# Requires supporting files with custom matchers and macros, etc,
|
12
|
-
# in ./support/ and its subdirectories.
|
13
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
14
|
-
|
15
|
-
# RSpec configuration
|
16
|
-
RSpec.configure do |config|
|
17
|
-
|
18
|
-
end
|
metadata
CHANGED
@@ -1,100 +1,88 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magician
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Nicolas McCurdy
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-02 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
14
|
+
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
19
|
+
version: '1.3'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
26
|
+
version: '1.3'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
28
|
+
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: '0
|
33
|
+
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: '0
|
40
|
+
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
42
|
+
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
47
|
+
version: '2.13'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
54
|
+
version: '2.13'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
56
|
+
name: yard
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
61
|
+
version: '0.7'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
68
|
+
version: '0.7'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
70
|
+
name: rdoc
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ~>
|
84
74
|
- !ruby/object:Gem::Version
|
85
|
-
version: '
|
75
|
+
version: '4.0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ~>
|
92
81
|
- !ruby/object:Gem::Version
|
93
|
-
version: '
|
82
|
+
version: '4.0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: simplecov
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - ~>
|
100
88
|
- !ruby/object:Gem::Version
|
@@ -102,20 +90,19 @@ dependencies:
|
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
94
|
- - ~>
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0.7'
|
110
97
|
description: A suite of handy methods for doing calculations in irb.
|
111
|
-
email:
|
98
|
+
email:
|
99
|
+
- thenickperson@gmail.com
|
112
100
|
executables: []
|
113
101
|
extensions: []
|
114
|
-
extra_rdoc_files:
|
115
|
-
- LICENSE.txt
|
116
|
-
- README.md
|
102
|
+
extra_rdoc_files: []
|
117
103
|
files:
|
118
104
|
- .document
|
105
|
+
- .gitignore
|
119
106
|
- .rspec
|
120
107
|
- .travis.yml
|
121
108
|
- CHANGELOG.md
|
@@ -123,7 +110,6 @@ files:
|
|
123
110
|
- LICENSE.txt
|
124
111
|
- README.md
|
125
112
|
- Rakefile
|
126
|
-
- VERSION
|
127
113
|
- lib/magician.rb
|
128
114
|
- lib/magician/array.rb
|
129
115
|
- lib/magician/integer.rb
|
@@ -132,9 +118,11 @@ files:
|
|
132
118
|
- lib/magician/random.rb
|
133
119
|
- lib/magician/shortcuts.rb
|
134
120
|
- lib/magician/string.rb
|
121
|
+
- lib/magician/version.rb
|
135
122
|
- magician.gemspec
|
136
123
|
- spec/array_spec.rb
|
137
124
|
- spec/integer_spec.rb
|
125
|
+
- spec/magician_spec.rb
|
138
126
|
- spec/math_spec.rb
|
139
127
|
- spec/numeric_spec.rb
|
140
128
|
- spec/random_spec.rb
|
@@ -144,29 +132,35 @@ files:
|
|
144
132
|
homepage: http://github.com/thenickperson/magician
|
145
133
|
licenses:
|
146
134
|
- MIT
|
135
|
+
metadata: {}
|
147
136
|
post_install_message:
|
148
137
|
rdoc_options: []
|
149
138
|
require_paths:
|
150
139
|
- lib
|
151
140
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
|
-
none: false
|
153
141
|
requirements:
|
154
|
-
- -
|
142
|
+
- - '>='
|
155
143
|
- !ruby/object:Gem::Version
|
156
144
|
version: '0'
|
157
|
-
segments:
|
158
|
-
- 0
|
159
|
-
hash: -48719407583839754
|
160
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
146
|
requirements:
|
163
|
-
- -
|
147
|
+
- - '>='
|
164
148
|
- !ruby/object:Gem::Version
|
165
149
|
version: '0'
|
166
150
|
requirements: []
|
167
151
|
rubyforge_project:
|
168
|
-
rubygems_version:
|
152
|
+
rubygems_version: 2.0.3
|
169
153
|
signing_key:
|
170
|
-
specification_version:
|
154
|
+
specification_version: 4
|
171
155
|
summary: A suite of handy methods for doing calculations in irb.
|
172
|
-
test_files:
|
156
|
+
test_files:
|
157
|
+
- spec/array_spec.rb
|
158
|
+
- spec/integer_spec.rb
|
159
|
+
- spec/magician_spec.rb
|
160
|
+
- spec/math_spec.rb
|
161
|
+
- spec/numeric_spec.rb
|
162
|
+
- spec/random_spec.rb
|
163
|
+
- spec/shortcuts_spec.rb
|
164
|
+
- spec/spec_helper.rb
|
165
|
+
- spec/string_spec.rb
|
166
|
+
has_rdoc:
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.3.0
|