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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0386e1e55cd76eea5ccb2e630d9c74beda25f267
4
- data.tar.gz: f08e29e09e25797eba6709d179a9b7659e7dee33
3
+ metadata.gz: 4136265ce928bb1a6e05067c4c55aa02ef7150b2
4
+ data.tar.gz: 995376080a5c865fadee3c28d11d791c64d11326
5
5
  SHA512:
6
- metadata.gz: c45aad99e85ecb1508026099c13d89be3a81c7727a090314cc1b7663e342546373e23e18b51e6feb8533fa7a7459895ff74921328ea6116358a4da613a3df666
7
- data.tar.gz: fef1f8d0c814c2ff3f373302b01c9b64488725a4831aafab4a7b29064c3133545edaeb01d17f457a5bc796a9d517eba76d1c4a228c7a1b0517bbfe7274e346ef
6
+ metadata.gz: c944b2f8ba71f92e20d371aec61f02356ca8d645506614e0b80e1139f1f50fb35b8b628743340f6d97b0414a3057481d0f338055ee1a2d05fd0b3b372aa8e214
7
+ data.tar.gz: 716ba3a5e260e48887b320f5a32104623ae3eee5404c28de5918e89515445835b886e4638d09d5725e76494359603153077811362ee98f54eeb31938366b57c7
@@ -1,3 +1,7 @@
1
- magnifier_options:
2
- site: "http://www.mijndagjeweg.nl/"
3
- api_key: "your-api-key"
1
+ magnifier_options:
2
+ development:
3
+ site: "http://www.mijndagjeweg.nl"
4
+ api_key: "your-api-key"
5
+ development:
6
+ site: "http://localhost:8080"
7
+ api_key: "your-api-key"
@@ -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
- YAML::load(File.open("config/magnifier_options.yml"))['magnifier_options']['site']
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
- YAML::load(File.open("config/magnifier_options.yml"))['magnifier_options']['api_key']
22
+ options['magnifier_options'][Rails.env]['api_key']
18
23
  rescue
19
- # puts ""
24
+
20
25
  end
21
26
  end
22
- end
27
+ end
23
28
 
24
29
  require "magnifier/project"
25
30
  require "magnifier/page"
@@ -9,4 +9,13 @@ class Project < ActiveResource::Base
9
9
  npid = new_project["id"]
10
10
  return Project.find(npid)
11
11
  end
12
- end
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
@@ -1,3 +1,3 @@
1
1
  module Magnifier
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-11 00:00:00.000000000 Z
12
+ date: 2013-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler