fastly 1.1.1 → 1.1.2
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.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/{Changes → HISTORY.md} +7 -0
- data/Rakefile +8 -0
- data/lib/fastly.rb +2 -2
- data/lib/fastly/base.rb +1 -2
- data/lib/fastly/cache_setting.rb +1 -1
- data/lib/fastly/gem_version.rb +1 -1
- data/lib/fastly/request_setting.rb +1 -1
- data/lib/fastly/util.rb +9 -0
- data/test/fastly/util_test.rb +20 -0
- data/test/test_helper.rb +2 -0
- metadata +8 -4
- data/lib/fastly/string.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ef96a7f613dfa4a86cf2312c52bce16235bf7cf
|
4
|
+
data.tar.gz: 4d5b36b94d9d90f263f3f831dc72cfb333d88813
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 128bb682ee2ed4be291c9eb7d0bbf420e88d4c2f33c139dd606696bc80aefd74638040a3d77b034cefa3f8ba0e6d4f003be5e5f627762b88f4f4f5ffd8e6038b
|
7
|
+
data.tar.gz: a3bfafd5d8517237b3f0a452d2bb4397d3f57a6685c7cad38a57b582730e898d758ee49d5106b7c76431937b986f7f9a16adb1d30e085f76f4897713e6cb7a16
|
data/Gemfile
CHANGED
data/{Changes → HISTORY.md}
RENAMED
@@ -1,3 +1,10 @@
|
|
1
|
+
# 2014-06-12 v1.1.2
|
2
|
+
* Replace `String#underscore` with `Fastly::Util.class_to_path` method.
|
3
|
+
* Add first true unit test
|
4
|
+
* Add `test_helper.rb`
|
5
|
+
* Add `pry` as dependency
|
6
|
+
* Add console Rake task
|
7
|
+
|
1
8
|
2013-11-26 v1.02
|
2
9
|
|
3
10
|
Fix rdoc dependency and quorum spelling (Kristoffer Renholm)
|
data/Rakefile
CHANGED
@@ -2,6 +2,14 @@ require 'bundler/gem_tasks'
|
|
2
2
|
require 'rake/testtask'
|
3
3
|
require 'rdoc/task'
|
4
4
|
|
5
|
+
desc 'Run library from within a Pry console'
|
6
|
+
task :console do
|
7
|
+
require 'pry'
|
8
|
+
require 'fastly'
|
9
|
+
ARGV.clear
|
10
|
+
Pry.start
|
11
|
+
end
|
12
|
+
|
5
13
|
RDoc::Task.new do |rdoc|
|
6
14
|
rdoc.rdoc_dir = 'doc'
|
7
15
|
rdoc.main = 'README.md'
|
data/lib/fastly.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# A client library for interacting with the Fastly web acceleration service
|
6
6
|
class Fastly
|
7
7
|
require 'fastly/gem_version'
|
8
|
-
require 'fastly/
|
8
|
+
require 'fastly/util'
|
9
9
|
require 'fastly/fetcher'
|
10
10
|
require 'fastly/client'
|
11
11
|
|
@@ -155,7 +155,7 @@ class Fastly
|
|
155
155
|
end
|
156
156
|
|
157
157
|
[User, Customer, Backend, CacheSetting, Condition, Director, Domain, Header, Healthcheck, Gzip, Match, Origin, RequestSetting, ResponseObject, Service, S3Logging, Syslog, VCL, Version].each do |klass|
|
158
|
-
type =
|
158
|
+
type = Util.class_to_path(klass)
|
159
159
|
# unless the class doesn't have a list path or it already exists
|
160
160
|
unless klass.list_path.nil? || klass.respond_to?("list_#{type}s".to_sym)
|
161
161
|
self.send :define_method, "list_#{type}s".to_sym do |*args|
|
data/lib/fastly/base.rb
CHANGED
data/lib/fastly/cache_setting.rb
CHANGED
data/lib/fastly/gem_version.rb
CHANGED
data/lib/fastly/util.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class Fastly
|
4
|
+
class FooBar; end
|
5
|
+
class FooBarBaz; end
|
6
|
+
describe Util do
|
7
|
+
describe '.class_to_path' do
|
8
|
+
let(:klass) { Fastly::FooBar }
|
9
|
+
let(:klass_with_s) { Fastly::FooBarBaz }
|
10
|
+
|
11
|
+
it 'should convert a class name to an underscored path' do
|
12
|
+
assert_equal 'foo_bar', Util.class_to_path(klass)
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should append an s if second argument is true' do
|
16
|
+
assert_equal 'foo_bar_bazs', Util.class_to_path(klass_with_s, true)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fastly Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curb
|
@@ -48,8 +48,8 @@ extra_rdoc_files: []
|
|
48
48
|
files:
|
49
49
|
- ".gitignore"
|
50
50
|
- ".travis.yml"
|
51
|
-
- Changes
|
52
51
|
- Gemfile
|
52
|
+
- HISTORY.md
|
53
53
|
- LICENSE
|
54
54
|
- README.md
|
55
55
|
- Rakefile
|
@@ -78,17 +78,19 @@ files:
|
|
78
78
|
- lib/fastly/s3_logging.rb
|
79
79
|
- lib/fastly/service.rb
|
80
80
|
- lib/fastly/settings.rb
|
81
|
-
- lib/fastly/string.rb
|
82
81
|
- lib/fastly/syslog.rb
|
83
82
|
- lib/fastly/user.rb
|
83
|
+
- lib/fastly/util.rb
|
84
84
|
- lib/fastly/vcl.rb
|
85
85
|
- lib/fastly/version.rb
|
86
86
|
- test/admin_test.rb
|
87
87
|
- test/api_key_test.rb
|
88
88
|
- test/common.rb
|
89
|
+
- test/fastly/util_test.rb
|
89
90
|
- test/full_login_test.rb
|
90
91
|
- test/helper.rb
|
91
92
|
- test/stats_test.rb
|
93
|
+
- test/test_helper.rb
|
92
94
|
homepage: http://github.com/fastly/fastly-ruby
|
93
95
|
licenses:
|
94
96
|
- MIT
|
@@ -117,6 +119,8 @@ test_files:
|
|
117
119
|
- test/admin_test.rb
|
118
120
|
- test/api_key_test.rb
|
119
121
|
- test/common.rb
|
122
|
+
- test/fastly/util_test.rb
|
120
123
|
- test/full_login_test.rb
|
121
124
|
- test/helper.rb
|
122
125
|
- test/stats_test.rb
|
126
|
+
- test/test_helper.rb
|