lookup 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.bundle/config +2 -0
- data/.gitignore +1 -0
- data/Gemfile +5 -5
- data/Gemfile.lock +13 -5
- data/config/lookup +0 -1
- data/lib/{lookup.sqlite3 → lib/lookup.sqlite3} +0 -0
- data/lib/lookup.rb +9 -8
- data/lib/{models.rb → lookup/models.rb} +0 -0
- data/lib/lookup/version.rb +3 -0
- data/lookup.gemspec +5 -11
- data/spec/.lookup/config +0 -1
- data/spec/.lookup/lookup.sqlite3 +0 -0
- data/spec/config +0 -1
- data/spec/lookup_spec.rb +3 -3
- metadata +31 -30
- data/install.rb +0 -2
- data/postinstall.rb +0 -5
data/.bundle/config
ADDED
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
source
|
2
|
-
gem 'activerecord', :require => "active_record"
|
3
|
-
gem 'nokogiri'
|
4
|
-
gem 'find_by_hash'
|
5
|
-
gem 'sqlite3-ruby'
|
1
|
+
source :gemcutter
|
6
2
|
|
7
3
|
group :test do
|
8
4
|
gem 'rspec', '~> 2.0.0.beta.20'
|
9
5
|
gem 'webmock'
|
10
6
|
end
|
7
|
+
|
8
|
+
# Specify your gem's dependencies in lookup.gemspec
|
9
|
+
gemspec
|
10
|
+
|
data/Gemfile.lock
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
lookup (1.1.0)
|
5
|
+
activerecord (>= 2.3.8)
|
6
|
+
nokogiri
|
7
|
+
sqlite3-ruby (>= 1.2.5)
|
8
|
+
webmock
|
9
|
+
|
1
10
|
GEM
|
2
11
|
remote: http://rubygems.org/
|
3
12
|
specs:
|
@@ -17,8 +26,6 @@ GEM
|
|
17
26
|
builder (2.1.2)
|
18
27
|
crack (0.1.8)
|
19
28
|
diff-lcs (1.1.2)
|
20
|
-
find_by_hash (0.0.1)
|
21
|
-
activerecord
|
22
29
|
i18n (0.4.1)
|
23
30
|
nokogiri (1.4.3.1)
|
24
31
|
rspec (2.0.0.beta.22)
|
@@ -41,9 +48,10 @@ PLATFORMS
|
|
41
48
|
ruby
|
42
49
|
|
43
50
|
DEPENDENCIES
|
44
|
-
activerecord
|
45
|
-
|
51
|
+
activerecord (>= 2.3.8)
|
52
|
+
bundler (>= 1.0.0)
|
53
|
+
lookup!
|
46
54
|
nokogiri
|
47
55
|
rspec (~> 2.0.0.beta.20)
|
48
|
-
sqlite3-ruby
|
56
|
+
sqlite3-ruby (>= 1.2.5)
|
49
57
|
webmock
|
data/config/lookup
CHANGED
File without changes
|
data/lib/lookup.rb
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
require 'rubygems'
|
2
1
|
require 'net/http'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
require 'active_record'
|
3
5
|
|
4
|
-
gemfile = File.expand_path('../../Gemfile', __FILE__)
|
5
|
-
require 'bundler'
|
6
|
-
ENV['BUNDLE_GEMFILE'] = gemfile
|
7
|
-
Bundler.require(:default)
|
8
6
|
|
9
7
|
# Because some of you don't have ActiveSupport 3.0
|
10
8
|
# And I'm too lazy to require all the shit for 2.3.8 just for this.
|
11
|
-
|
12
9
|
class Hash
|
13
10
|
def stringify_keys!
|
14
11
|
keys.each do |key|
|
@@ -19,7 +16,6 @@ class Hash
|
|
19
16
|
end
|
20
17
|
|
21
18
|
module Lookup
|
22
|
-
VERSION = "1.0.0"
|
23
19
|
APIS = []
|
24
20
|
|
25
21
|
class APINotFound < StandardError; end
|
@@ -39,6 +35,11 @@ module Lookup
|
|
39
35
|
end
|
40
36
|
|
41
37
|
def update!
|
38
|
+
FileUtils.mkdir_p(home)
|
39
|
+
if !File.exists?(home + "config")
|
40
|
+
FileUtils.cp(File.dirname(__FILE__) + "/../config/lookup", home + "config")
|
41
|
+
end
|
42
|
+
|
42
43
|
puts "Updating API, this may take a minute or two. Please be patient!"
|
43
44
|
[Constant, Entry, Api].map { |klass| klass.delete_all }
|
44
45
|
puts "Updating #{apis.size} APIs."
|
@@ -191,4 +192,4 @@ module Lookup
|
|
191
192
|
end
|
192
193
|
end
|
193
194
|
|
194
|
-
require
|
195
|
+
require 'lookup/models'
|
File without changes
|
data/lookup.gemspec
CHANGED
@@ -1,23 +1,17 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
# -*- encoding: utf-8 -*-
|
7
|
-
require File.expand_path("../lib/lookup", __FILE__)
|
2
|
+
require File.expand_path("../lib/lookup/version", __FILE__)
|
8
3
|
|
9
4
|
Gem::Specification.new do |s|
|
10
5
|
s.name = "lookup"
|
11
6
|
s.version = Lookup::VERSION
|
12
7
|
s.platform = Gem::Platform::RUBY
|
13
|
-
s.authors = [
|
14
|
-
s.email = [
|
8
|
+
s.authors = []
|
9
|
+
s.email = []
|
15
10
|
s.homepage = "http://rubygems.org/gems/lookup"
|
16
|
-
s.summary = "
|
17
|
-
s.description = "
|
11
|
+
s.summary = "Lazy man's RI"
|
12
|
+
s.description = "Lazy man's RI"
|
18
13
|
|
19
14
|
s.required_rubygems_version = ">= 1.3.6"
|
20
|
-
s.rubyforge_project = "lookup"
|
21
15
|
|
22
16
|
s.add_development_dependency "bundler", ">= 1.0.0"
|
23
17
|
|
data/spec/.lookup/config
CHANGED
data/spec/.lookup/lookup.sqlite3
CHANGED
Binary file
|
data/spec/config
CHANGED
data/spec/lookup_spec.rb
CHANGED
metadata
CHANGED
@@ -1,28 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lookup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 1.0.0
|
10
|
+
version: 1.1.0
|
11
11
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
|
12
|
+
authors: []
|
13
|
+
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-02 00:00:00 +10:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: bundler
|
23
|
-
type: :development
|
24
23
|
prerelease: false
|
25
|
-
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
25
|
none: false
|
27
26
|
requirements:
|
28
27
|
- - ">="
|
@@ -33,12 +32,12 @@ dependencies:
|
|
33
32
|
- 0
|
34
33
|
- 0
|
35
34
|
version: 1.0.0
|
36
|
-
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: sqlite3-ruby
|
39
|
-
type: :runtime
|
40
39
|
prerelease: false
|
41
|
-
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
41
|
none: false
|
43
42
|
requirements:
|
44
43
|
- - ">="
|
@@ -49,12 +48,12 @@ dependencies:
|
|
49
48
|
- 2
|
50
49
|
- 5
|
51
50
|
version: 1.2.5
|
52
|
-
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: nokogiri
|
55
|
-
type: :runtime
|
56
55
|
prerelease: false
|
57
|
-
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
58
57
|
none: false
|
59
58
|
requirements:
|
60
59
|
- - ">="
|
@@ -63,12 +62,12 @@ dependencies:
|
|
63
62
|
segments:
|
64
63
|
- 0
|
65
64
|
version: "0"
|
66
|
-
|
65
|
+
type: :runtime
|
66
|
+
version_requirements: *id003
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: activerecord
|
69
|
-
type: :runtime
|
70
69
|
prerelease: false
|
71
|
-
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
72
71
|
none: false
|
73
72
|
requirements:
|
74
73
|
- - ">="
|
@@ -79,12 +78,12 @@ dependencies:
|
|
79
78
|
- 3
|
80
79
|
- 8
|
81
80
|
version: 2.3.8
|
82
|
-
|
81
|
+
type: :runtime
|
82
|
+
version_requirements: *id004
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: webmock
|
85
|
-
type: :runtime
|
86
85
|
prerelease: false
|
87
|
-
|
86
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
88
87
|
none: false
|
89
88
|
requirements:
|
90
89
|
- - ">="
|
@@ -93,10 +92,11 @@ dependencies:
|
|
93
92
|
segments:
|
94
93
|
- 0
|
95
94
|
version: "0"
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
95
|
+
type: :runtime
|
96
|
+
version_requirements: *id005
|
97
|
+
description: Lazy man's RI
|
98
|
+
email: []
|
99
|
+
|
100
100
|
executables:
|
101
101
|
- lookup
|
102
102
|
extensions: []
|
@@ -104,20 +104,21 @@ extensions: []
|
|
104
104
|
extra_rdoc_files: []
|
105
105
|
|
106
106
|
files:
|
107
|
+
- .bundle/config
|
107
108
|
- .gitignore
|
108
109
|
- Gemfile
|
109
110
|
- Gemfile.lock
|
110
111
|
- LICENSE
|
111
112
|
- README.md
|
112
113
|
- Rakefile
|
114
|
+
- Rakefile.compiled.rbc
|
113
115
|
- bin/lookup
|
114
116
|
- config/lookup
|
115
|
-
-
|
117
|
+
- lib/lib/lookup.sqlite3
|
116
118
|
- lib/lookup.rb
|
117
|
-
- lib/lookup.
|
118
|
-
- lib/
|
119
|
+
- lib/lookup/models.rb
|
120
|
+
- lib/lookup/version.rb
|
119
121
|
- lookup.gemspec
|
120
|
-
- postinstall.rb
|
121
122
|
- spec/.lookup/config
|
122
123
|
- spec/.lookup/lookup.sqlite3
|
123
124
|
- spec/apis/1.8/classes.html
|
@@ -165,10 +166,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
166
|
version: 1.3.6
|
166
167
|
requirements: []
|
167
168
|
|
168
|
-
rubyforge_project:
|
169
|
+
rubyforge_project:
|
169
170
|
rubygems_version: 1.3.7
|
170
171
|
signing_key:
|
171
172
|
specification_version: 3
|
172
|
-
summary:
|
173
|
+
summary: Lazy man's RI
|
173
174
|
test_files: []
|
174
175
|
|
data/install.rb
DELETED