magnifier 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/magnifier_options.yml +7 -3
- data/lib/magnifier.rb +9 -4
- data/lib/magnifier/project.rb +10 -1
- data/lib/magnifier/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4136265ce928bb1a6e05067c4c55aa02ef7150b2
|
4
|
+
data.tar.gz: 995376080a5c865fadee3c28d11d791c64d11326
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c944b2f8ba71f92e20d371aec61f02356ca8d645506614e0b80e1139f1f50fb35b8b628743340f6d97b0414a3057481d0f338055ee1a2d05fd0b3b372aa8e214
|
7
|
+
data.tar.gz: 716ba3a5e260e48887b320f5a32104623ae3eee5404c28de5918e89515445835b886e4638d09d5725e76494359603153077811362ee98f54eeb31938366b57c7
|
data/lib/magnifier.rb
CHANGED
@@ -4,9 +4,14 @@ require 'magnifier/railtie' if defined?(Rails)
|
|
4
4
|
|
5
5
|
module Magnifier
|
6
6
|
class Settings
|
7
|
+
|
8
|
+
def self.options
|
9
|
+
YAML::load(File.open("config/magnifier_options.yml"))
|
10
|
+
end
|
11
|
+
|
7
12
|
def self.site
|
8
13
|
begin
|
9
|
-
|
14
|
+
options['magnifier_options'][Rails.env]['site']
|
10
15
|
rescue
|
11
16
|
|
12
17
|
end
|
@@ -14,12 +19,12 @@ module Magnifier
|
|
14
19
|
|
15
20
|
def self.api_key
|
16
21
|
begin
|
17
|
-
|
22
|
+
options['magnifier_options'][Rails.env]['api_key']
|
18
23
|
rescue
|
19
|
-
|
24
|
+
|
20
25
|
end
|
21
26
|
end
|
22
|
-
end
|
27
|
+
end
|
23
28
|
|
24
29
|
require "magnifier/project"
|
25
30
|
require "magnifier/page"
|
data/lib/magnifier/project.rb
CHANGED
@@ -9,4 +9,13 @@ class Project < ActiveResource::Base
|
|
9
9
|
npid = new_project["id"]
|
10
10
|
return Project.find(npid)
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
|
+
def pages(scope = :all)
|
14
|
+
Page.find(scope, :params => {:project_id => self.id})
|
15
|
+
end
|
16
|
+
|
17
|
+
def make_previews
|
18
|
+
self.get :make_previews
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/lib/magnifier/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magnifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henk Meijer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|