scribd_fu 2.0.9 → 2.0.10

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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.9
1
+ 2.0.10
data/lib/scribd_fu.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module ScribdFu
2
2
 
3
- ConfigPath = "#{RAILS_ROOT}/config/scribd_fu.yml".freeze
3
+ ConfigPath = "#{::Rails.root.to_s}/config/scribd_fu.yml".freeze
4
4
 
5
5
  # A list of content types supported by iPaper.
6
6
  ContentTypes = [
@@ -36,7 +36,7 @@ module ScribdFu
36
36
  # Available parameters for the JS API
37
37
  # http://www.scribd.com/publisher/api/api?method_name=Javascript+API
38
38
  Available_JS_Params = [ :height, :width, :page, :my_user_id, :search_query,
39
- :jsapi_version, :disable_related_docs, :mode, :auto_size ]
39
+ :jsapi_version, :disable_related_docs, :mode, :auto_size, :hide_disabled_buttons, :hide_full_screen_button]
40
40
 
41
41
  class ScribdFuError < StandardError #:nodoc:
42
42
  end
@@ -247,7 +247,13 @@ module ScribdFu
247
247
  opt = []
248
248
 
249
249
  options.each_pair do |k, v|
250
- opt << "scribd_doc.addParam('#{k}', '#{v}');" if Available_JS_Params.include?(k)
250
+ if Available_JS_Params.include?(k)
251
+ if v == true || v == false
252
+ opt << "scribd_doc.addParam('#{k}', #{v});"
253
+ else
254
+ opt << "scribd_doc.addParam('#{k}', '#{v}');"
255
+ end
256
+ end
251
257
  end
252
258
 
253
259
  opt.compact.join("\n")
data/scribd_fu.gemspec CHANGED
@@ -1,52 +1,49 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{scribd_fu}
8
- s.version = "2.0.9"
8
+ s.version = "2.0.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Darby"]
12
- s.date = %q{2010-07-09}
12
+ s.date = %q{2011-03-28}
13
13
  s.description = %q{A Rails gem that streamlines interactions with the Scribd service}
14
14
  s.email = %q{matt@matt-darby.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.textile"
17
+ "README.textile"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.textile",
24
- "Rakefile",
25
- "VERSION",
26
- "generators/scribd_fu/scribd_fu_generator.rb",
27
- "generators/scribd_fu/templates/scribd_fu.yml",
28
- "init.rb",
29
- "lib/scribd_fu.rb",
30
- "lib/scribd_fu/attachment_fu.rb",
31
- "lib/scribd_fu/paperclip.rb",
32
- "scribd_fu.gemspec",
33
- "spec/database.yml",
34
- "spec/scribd_fu.yml",
35
- "spec/scribd_fu_spec.rb",
36
- "spec/spec_helper.rb"
21
+ "LICENSE",
22
+ "README.textile",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "generators/scribd_fu/scribd_fu_generator.rb",
26
+ "generators/scribd_fu/templates/scribd_fu.yml",
27
+ "init.rb",
28
+ "lib/scribd_fu.rb",
29
+ "lib/scribd_fu/attachment_fu.rb",
30
+ "lib/scribd_fu/paperclip.rb",
31
+ "scribd_fu.gemspec",
32
+ "spec/database.yml",
33
+ "spec/scribd_fu.yml",
34
+ "spec/scribd_fu_spec.rb",
35
+ "spec/spec_helper.rb"
37
36
  ]
38
37
  s.homepage = %q{http://github.com/mdarby/scribd_fu}
39
- s.rdoc_options = ["--charset=UTF-8"]
40
38
  s.require_paths = ["lib"]
41
- s.rubygems_version = %q{1.3.7}
39
+ s.rubygems_version = %q{1.6.1}
42
40
  s.summary = %q{A Rails gem that streamlines interactions with the Scribd service}
43
41
  s.test_files = [
44
42
  "spec/scribd_fu_spec.rb",
45
- "spec/spec_helper.rb"
43
+ "spec/spec_helper.rb"
46
44
  ]
47
45
 
48
46
  if s.respond_to? :specification_version then
49
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
50
47
  s.specification_version = 3
51
48
 
52
49
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -350,5 +350,10 @@ describe "Viewing an iPaper document" do
350
350
  @document.display_ipaper(options).should =~ /.*scribd_doc\.addParam\('width', '100'\);.*/
351
351
  @document.display_ipaper(options).should_not =~ /.*scribd_doc\.addParam\('some_dumb_setting', '100'\);.*/
352
352
  end
353
+
354
+ it "should send booleans as booleans" do
355
+ options = {:hide_disabled_buttons => true}
356
+ @document.display_ipaper(options).should =~ /.*scribd_doc\.addParam\('hide_disabled_buttons', true\);.*/
357
+ end
353
358
 
354
359
  end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scribd_fu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease: false
6
- segments:
7
- - 2
8
- - 0
9
- - 9
10
- version: 2.0.9
4
+ prerelease:
5
+ version: 2.0.10
11
6
  platform: ruby
12
7
  authors:
13
8
  - Matt Darby
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2010-07-09 00:00:00 -04:00
13
+ date: 2011-03-28 00:00:00 -04:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
@@ -26,9 +21,6 @@ dependencies:
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
24
  version: "0"
33
25
  type: :runtime
34
26
  version_requirements: *id001
@@ -43,7 +35,6 @@ extra_rdoc_files:
43
35
  - README.textile
44
36
  files:
45
37
  - .document
46
- - .gitignore
47
38
  - LICENSE
48
39
  - README.textile
49
40
  - Rakefile
@@ -64,8 +55,8 @@ homepage: http://github.com/mdarby/scribd_fu
64
55
  licenses: []
65
56
 
66
57
  post_install_message:
67
- rdoc_options:
68
- - --charset=UTF-8
58
+ rdoc_options: []
59
+
69
60
  require_paths:
70
61
  - lib
71
62
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -73,23 +64,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
64
  requirements:
74
65
  - - ">="
75
66
  - !ruby/object:Gem::Version
76
- hash: 3
77
- segments:
78
- - 0
79
67
  version: "0"
80
68
  required_rubygems_version: !ruby/object:Gem::Requirement
81
69
  none: false
82
70
  requirements:
83
71
  - - ">="
84
72
  - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
73
  version: "0"
89
74
  requirements: []
90
75
 
91
76
  rubyforge_project:
92
- rubygems_version: 1.3.7
77
+ rubygems_version: 1.6.1
93
78
  signing_key:
94
79
  specification_version: 3
95
80
  summary: A Rails gem that streamlines interactions with the Scribd service
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC