megalopolis 0.0.1 → 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.
- data/.travis.yml +4 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +2 -0
- data/README.md +6 -0
- data/Rakefile +7 -0
- data/lib/megalopolis/scheme.rb +4 -15
- data/lib/megalopolis/version.rb +1 -1
- data/megalopolis.gemspec +1 -0
- data/spec/spec_helper.rb +1 -1
- metadata +10 -2
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
# megalopolis-ruby
|
|
2
2
|
|
|
3
|
+
[](http://travis-ci.org/oame/megalopolis-ruby)
|
|
4
|
+
|
|
3
5
|
Megalopolis API wrapper for Ruby.
|
|
4
6
|
|
|
7
|
+
## Requirement
|
|
8
|
+
|
|
9
|
+
* Ruby 1.9.x
|
|
10
|
+
|
|
5
11
|
## Installation
|
|
6
12
|
|
|
7
13
|
Add this line to your application's Gemfile:
|
data/Rakefile
CHANGED
data/lib/megalopolis/scheme.rb
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
|
-
class
|
|
4
|
-
attr_accessor :hash
|
|
5
|
-
|
|
6
|
-
def initialize(hash)
|
|
7
|
-
super(hash)
|
|
8
|
-
@hash = hash
|
|
9
|
-
end
|
|
10
|
-
|
|
3
|
+
class Hash
|
|
11
4
|
def method_missing(action, *args)
|
|
12
|
-
return
|
|
5
|
+
return self[action.to_s] rescue nil
|
|
13
6
|
end
|
|
14
7
|
|
|
15
|
-
def params()
|
|
16
|
-
|
|
17
|
-
def to_hash
|
|
18
|
-
@hash
|
|
19
|
-
end
|
|
8
|
+
def params() self.keys.map{|k|k.to_sym} ; end
|
|
20
9
|
end
|
|
21
10
|
|
|
22
11
|
class Megalopolis
|
|
@@ -64,7 +53,7 @@ class Megalopolis
|
|
|
64
53
|
end
|
|
65
54
|
|
|
66
55
|
def method_missing(action, *args)
|
|
67
|
-
return
|
|
56
|
+
return @novel[action.to_s] rescue nil
|
|
68
57
|
end
|
|
69
58
|
|
|
70
59
|
def params() @novel.keys.map{|k|k.to_sym} ; end
|
data/lib/megalopolis/version.rb
CHANGED
data/megalopolis.gemspec
CHANGED
data/spec/spec_helper.rb
CHANGED
|
@@ -6,7 +6,7 @@ require "megalopolis"
|
|
|
6
6
|
RSpec.configure do |config|
|
|
7
7
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
|
8
8
|
config.run_all_when_everything_filtered = true
|
|
9
|
-
config.filter_run :focus
|
|
9
|
+
#config.filter_run :focus
|
|
10
10
|
config.color_enabled = true
|
|
11
11
|
|
|
12
12
|
# Run specs in random order to surface order dependencies. If you find an
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: megalopolis
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: '1.0'
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-10-
|
|
12
|
+
date: 2012-10-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: Megalopolis API wrapper for Ruby
|
|
15
15
|
email:
|
|
@@ -20,6 +20,8 @@ extra_rdoc_files: []
|
|
|
20
20
|
files:
|
|
21
21
|
- .gitignore
|
|
22
22
|
- .rspec
|
|
23
|
+
- .travis.yml
|
|
24
|
+
- CHANGELOG.md
|
|
23
25
|
- Gemfile
|
|
24
26
|
- LICENSE.txt
|
|
25
27
|
- README.md
|
|
@@ -43,12 +45,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
43
45
|
- - ! '>='
|
|
44
46
|
- !ruby/object:Gem::Version
|
|
45
47
|
version: '0'
|
|
48
|
+
segments:
|
|
49
|
+
- 0
|
|
50
|
+
hash: 270928971846965143
|
|
46
51
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
52
|
none: false
|
|
48
53
|
requirements:
|
|
49
54
|
- - ! '>='
|
|
50
55
|
- !ruby/object:Gem::Version
|
|
51
56
|
version: '0'
|
|
57
|
+
segments:
|
|
58
|
+
- 0
|
|
59
|
+
hash: 270928971846965143
|
|
52
60
|
requirements: []
|
|
53
61
|
rubyforge_project:
|
|
54
62
|
rubygems_version: 1.8.24
|