ajaxlibs 0.1.11 → 0.1.12

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/spec/library_spec.rb CHANGED
@@ -6,7 +6,7 @@ class Ajaxlibs::Library::Basic < Ajaxlibs::Library
6
6
  '1.5',
7
7
  '1.8.1',
8
8
  '2.0.1.3']
9
-
9
+
10
10
  Requirements = {'1.5' => {:prototype => nil}, :all => {:scriptaculous => nil}}
11
11
  end
12
12
 
@@ -16,7 +16,7 @@ describe "Ajaxlibs::Library" do
16
16
  Ajaxlibs::Library::Basic.library_name.should == 'basic'
17
17
  end
18
18
  end
19
-
19
+
20
20
  context "instance" do
21
21
  before :each do
22
22
  @library = Ajaxlibs::Library::Basic.new
@@ -25,32 +25,32 @@ describe "Ajaxlibs::Library" do
25
25
  it "should returns latest version" do
26
26
  @library.latest_version.should == '2.0.1.3'
27
27
  end
28
-
28
+
29
29
  it "should use the latest version if non provided" do
30
30
  @library.version.should == @library.latest_version
31
31
  end
32
-
32
+
33
33
  it "should use a local source if non provided" do
34
34
  @library.source.should == :local
35
35
  end
36
-
36
+
37
37
  it "should determine library_name by its own class name" do
38
38
  @library.library_name.should == 'basic'
39
39
  end
40
-
40
+
41
41
  it "should use library_name as file_name by default" do
42
42
  @library.library_name.should == @library.file_name
43
43
  end
44
-
44
+
45
45
  it "should search through requirements using key :all if requirements for specific version is not found" do
46
46
  @library.requires.should == {:scriptaculous => nil}
47
47
  end
48
-
48
+
49
49
  it "should be equal to another library instance if class, version and source are equals" do
50
50
  another_library = Ajaxlibs::Library::Basic.new(:version => @library.version, :source => @library.source)
51
51
  @library.should == another_library
52
52
  end
53
-
53
+
54
54
  it "should not be equal to another library instance if source differs" do
55
55
  another_library = Ajaxlibs::Library::Basic.new(:version => @library.version, :source => :remote)
56
56
  @library.should_not == another_library
@@ -78,29 +78,29 @@ describe "Ajaxlibs::Library" do
78
78
  @library = Ajaxlibs::Library::Basic.new(:version => '1.8.1')
79
79
  @library.local_path.should == "ajaxlibs/basic/1.8.1/basic"
80
80
  end
81
-
81
+
82
82
  example "using latest version if none was specified" do
83
83
  @library.local_path.should == "ajaxlibs/basic/2.0.1.3/basic"
84
84
  end
85
-
85
+
86
86
  example "while calling include_path" do
87
87
  @library.include_path.should == @library.local_path
88
- end
88
+ end
89
89
  end
90
-
90
+
91
91
  it "will return a secured (https) link if asked for secure" do
92
92
  @library = Ajaxlibs::Library::Basic.new(:secure => true)
93
93
  @library.google_cdn_include_path.should == "https://ajax.googleapis.com/ajax/libs/basic/2.0.1.3/basic.js"
94
94
  end
95
-
95
+
96
96
  it "will return a secured (https) link if asked for secure" do
97
97
  @library = Ajaxlibs::Library::Basic.new(:secure => false)
98
98
  @library.google_cdn_include_path.should == "http://ajax.googleapis.com/ajax/libs/basic/2.0.1.3/basic.js"
99
99
  end
100
-
100
+
101
101
  context "with a library supporting local distribution only" do
102
102
  before :all do
103
- # Jrails support is achieve through jrais gem which requires a rails environment.
103
+ # Jrails support is achieved through jrails gem which requires a rails environment.
104
104
  # We simply disable jrails gem loading before testing.
105
105
  class Ajaxlibs::Library::Jrails
106
106
  def initialize(options = {})
@@ -108,68 +108,68 @@ describe "Ajaxlibs::Library" do
108
108
  end
109
109
  end
110
110
  end
111
-
111
+
112
112
  it "will return a local path" do
113
113
  @library = Ajaxlibs::Library::Jrails.new
114
114
  @library.include_path.should == @library.local_path
115
115
  end
116
-
116
+
117
117
  it "will return a local path even if asked for remote source" do
118
118
  @library = Ajaxlibs::Library::Jrails.new(:source => :remote)
119
119
  @library.include_path.should == @library.local_path
120
120
  end
121
121
  end
122
-
122
+
123
123
  context "will return a javascript code to load from google cdn with library_name and version" do
124
124
  example "using provided version if specified" do
125
125
  @library = Ajaxlibs::Library::Basic.new(:version => '1.8.1')
126
126
  @library.google_cdn_include_path.should == "http://ajax.googleapis.com/ajax/libs/basic/1.8.1/basic.js"
127
127
  end
128
-
128
+
129
129
  example "using latest version if none was specified" do
130
130
  @library.google_cdn_include_path.should == "http://ajax.googleapis.com/ajax/libs/basic/2.0.1.3/basic.js"
131
- end
131
+ end
132
132
 
133
133
  example "while calling include_path" do
134
134
  @library = Ajaxlibs::Library::Basic.new(:source => :remote)
135
135
  @library.include_path.should == @library.google_cdn_include_path
136
- end
137
- end
136
+ end
137
+ end
138
138
  end
139
-
139
+
140
140
  context "instance with version provided" do
141
141
  before :each do
142
142
  @library = Ajaxlibs::Library::Basic.new(:version => '1.5')
143
143
  end
144
-
144
+
145
145
  it "should returns provided version" do
146
146
  @library.version.should == '1.5'
147
147
  end
148
-
148
+
149
149
  it "should search through requirements using provided version" do
150
150
  @library.requires.should == {:prototype => nil}
151
151
  end
152
152
  end
153
-
153
+
154
154
  context "instance with source provided" do
155
155
  before :each do
156
156
  @library = Ajaxlibs::Library::Basic.new(:source => :remote)
157
157
  end
158
-
158
+
159
159
  it "should returns provided source" do
160
160
  @library.source.should == :remote
161
161
  end
162
162
  end
163
-
163
+
164
164
  context "base class" do
165
165
  example "will return the right instance while searching by name" do
166
166
  Ajaxlibs::Library.by_name(:jquery).should be_kind_of(Ajaxlibs::Library::Jquery)
167
167
  end
168
-
168
+
169
169
  example "will use given version" do
170
170
  Ajaxlibs::Library.by_name(:jquery, :version => '1.3.2').version.should == '1.3.2'
171
171
  end
172
-
172
+
173
173
  example "will use given source" do
174
174
  Ajaxlibs::Library.by_name(:jquery, :source => :remote).source.should == :remote
175
175
  end
@@ -177,7 +177,7 @@ describe "Ajaxlibs::Library" do
177
177
  example "will raise an exception if library is not found" do
178
178
  lambda { Ajaxlibs::Library.by_name(:foo) }.should raise_error(Ajaxlibs::Exception::LibraryNotFound)
179
179
  end
180
-
180
+
181
181
  example "will raise an exception if version is not found" do
182
182
  lambda { Ajaxlibs::Library.by_name(:jquery, :version => '42') }.should raise_error(Ajaxlibs::Exception::VersionNotFound)
183
183
  end
@@ -193,5 +193,5 @@ describe "Ajaxlibs::Library" do
193
193
  Ajaxlibs::Library.by_name(:foo).should be_kind_of(Ajaxlibs::Library::Foo)
194
194
  end
195
195
  end
196
-
197
- end
196
+
197
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ajaxlibs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 11
10
- version: 0.1.11
9
+ - 12
10
+ version: 0.1.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Fabien Jakimowicz
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-26 00:00:00 +02:00
18
+ date: 2010-06-09 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -54,6 +54,7 @@ files:
54
54
  - lib/ajaxlibs/constants.rb
55
55
  - lib/ajaxlibs/exceptions.rb
56
56
  - lib/ajaxlibs/includes_helper.rb
57
+ - lib/ajaxlibs/libraries/chrome_frame.rb
57
58
  - lib/ajaxlibs/libraries/dojo.rb
58
59
  - lib/ajaxlibs/libraries/ext_core.rb
59
60
  - lib/ajaxlibs/libraries/jquery.rb
@@ -63,9 +64,16 @@ files:
63
64
  - lib/ajaxlibs/libraries/prototype.rb
64
65
  - lib/ajaxlibs/libraries/scriptaculous.rb
65
66
  - lib/ajaxlibs/libraries/swfobject.rb
67
+ - lib/ajaxlibs/libraries/webfont.rb
66
68
  - lib/ajaxlibs/libraries/yui.rb
67
69
  - lib/ajaxlibs/library.rb
68
70
  - lib/ajaxlibs/versions_tools.rb
71
+ - public/chrome-frame/1.0.0/CFInstall.js
72
+ - public/chrome-frame/1.0.0/CFInstall.js.1
73
+ - public/chrome-frame/1.0.1/CFInstall.js
74
+ - public/chrome-frame/1.0.1/CFInstall.min.js
75
+ - public/chrome-frame/1.0.2/CFInstall.js
76
+ - public/chrome-frame/1.0.2/CFInstall.min.js
69
77
  - public/dojo/1.1.1/dojo.xd.js
70
78
  - public/dojo/1.1.1/dojo.xd.js.uncompressed.js
71
79
  - public/dojo/1.2.0/dojo.xd.js
@@ -161,6 +169,8 @@ files:
161
169
  - public/swfobject/2.1/swfobject_src.js
162
170
  - public/swfobject/2.2/swfobject.js
163
171
  - public/swfobject/2.2/swfobject_src.js
172
+ - public/webfont/1/webfont.js
173
+ - public/webfont/1/webfont_debug.js
164
174
  - spec/includes_helper_spec.rb
165
175
  - spec/library_spec.rb
166
176
  - spec/spec.opts