twingly-analytics 2.0.0 → 2.0.1

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: f5c4ddb79208dbda2a2171067fe2c31cabff9fbc
4
- data.tar.gz: 8ce553588c30aba41aecf0b3a469abe2419c33d3
3
+ metadata.gz: 34cd6c71ed003b3b717313e4a4971037d2361094
4
+ data.tar.gz: c91a351f0bbacf7b00c40d380d244459ed29287e
5
5
  SHA512:
6
- metadata.gz: ccaef06060bbb5f9c155d6582e8f8a1a43bc557dd0f9de6eb89d6af76755b1e7711c87c77ce541c1e55f9b873678690f228857a31d001102833477e27d9f61d7
7
- data.tar.gz: c46959a67fcb05237e4cb3af84674822335cb841bd4b526523cd173e4039bc3033404c46a527f30d31ea184cfec45344f7b4a83d824709cddf1708103a66d437
6
+ metadata.gz: f6b23d04784f942d3881c3d2bfad39e9d4984f3eefae6bbba5265a410acf9468a85a5256c12cadbaeb7aff7f6d0f270697b5d300d74f58807b05182b6c89ce58
7
+ data.tar.gz: 01d5d1f1aea81311330948f0dffc31637d5094c1c2659cf22a8066389fffca102124ad350dbf306b93d795a611a684f4970c45bda24607c2ba153132f0969e17
data/CHANGELOG.md ADDED
@@ -0,0 +1,63 @@
1
+ # Change Log
2
+
3
+ ## [2.0.1](https://github.com/twingly/twingly-analytics-api-ruby/tree/2.0.1) (2015-09-24)
4
+ [Full Changelog](https://github.com/twingly/twingly-analytics-api-ruby/compare/2.0.0...2.0.1)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - Crash when pattern is empty string [\#17](https://github.com/twingly/twingly-analytics-api-ruby/issues/17)
9
+
10
+ **Merged pull requests:**
11
+
12
+ - Do not allow empty search pattern [\#18](https://github.com/twingly/twingly-analytics-api-ruby/pull/18) ([twingly-mob](https://github.com/twingly-mob))
13
+ - Generate Changelog \(with instructions to update it\) [\#16](https://github.com/twingly/twingly-analytics-api-ruby/pull/16) ([jage](https://github.com/jage))
14
+
15
+ ## [2.0.0](https://github.com/twingly/twingly-analytics-api-ruby/tree/2.0.0) (2015-09-14)
16
+ [Full Changelog](https://github.com/twingly/twingly-analytics-api-ruby/compare/1.0.1...2.0.0)
17
+
18
+ **Implemented enhancements:**
19
+
20
+ - Release gem to rubygems.org [\#10](https://github.com/twingly/twingly-analytics-api-ruby/issues/10)
21
+
22
+ **Merged pull requests:**
23
+
24
+ - Improve time pagination \(breaking compatibility for Query\#start\_time and Query\#end\_time\) [\#15](https://github.com/twingly/twingly-analytics-api-ruby/pull/15) ([jage](https://github.com/jage))
25
+
26
+ ## [1.0.1](https://github.com/twingly/twingly-analytics-api-ruby/tree/1.0.1) (2015-04-29)
27
+ [Full Changelog](https://github.com/twingly/twingly-analytics-api-ruby/compare/1.0.0...1.0.1)
28
+
29
+ **Fixed bugs:**
30
+
31
+ - Support Ruby 2.2 [\#12](https://github.com/twingly/twingly-analytics-api-ruby/issues/12)
32
+ - HTTPS broke compatibility with Ruby 1.9.3 [\#8](https://github.com/twingly/twingly-analytics-api-ruby/issues/8)
33
+
34
+ **Closed issues:**
35
+
36
+ - Use the rspec-its gem [\#11](https://github.com/twingly/twingly-analytics-api-ruby/issues/11)
37
+
38
+ **Merged pull requests:**
39
+
40
+ - Fix deprecations [\#14](https://github.com/twingly/twingly-analytics-api-ruby/pull/14) ([walro](https://github.com/walro))
41
+ - Support Ruby 2.2 [\#13](https://github.com/twingly/twingly-analytics-api-ruby/pull/13) ([dentarg](https://github.com/dentarg))
42
+ - Use Faraday instead of Net::HTTP directly [\#9](https://github.com/twingly/twingly-analytics-api-ruby/pull/9) ([jage](https://github.com/jage))
43
+
44
+ ## [1.0.0](https://github.com/twingly/twingly-analytics-api-ruby/tree/1.0.0) (2014-10-30)
45
+ **Implemented enhancements:**
46
+
47
+ - Use HTTPS for API access [\#7](https://github.com/twingly/twingly-analytics-api-ruby/issues/7)
48
+ - Remove swedish comment [\#5](https://github.com/twingly/twingly-analytics-api-ruby/issues/5)
49
+ - Rewrite history to remove huge vcr-cassettes [\#4](https://github.com/twingly/twingly-analytics-api-ruby/issues/4)
50
+ - Remove humongous vcr cassettes [\#1](https://github.com/twingly/twingly-analytics-api-ruby/issues/1)
51
+
52
+ **Closed issues:**
53
+
54
+ - Add a LICENSE [\#6](https://github.com/twingly/twingly-analytics-api-ruby/issues/6)
55
+ - Wrap lines at 72 characters [\#2](https://github.com/twingly/twingly-analytics-api-ruby/issues/2)
56
+
57
+ **Merged pull requests:**
58
+
59
+ - Refactor to improve readability [\#3](https://github.com/twingly/twingly-analytics-api-ruby/pull/3) ([jage](https://github.com/jage))
60
+
61
+
62
+
63
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/README.md CHANGED
@@ -44,6 +44,13 @@ Too learn more about the capabilities of this API you should read the [Twingly A
44
44
  * API key, contact sales@twingly.com to get one
45
45
  * Ruby 1.9, 2.0, 2.1, 2.2
46
46
 
47
+ ## Development and release
48
+
49
+ * Bump version in `lib/twingly-analytics/version.rb`, follow [Semantic Versioning 2.0.0](http://semver.org/)
50
+ * Create a git tag and push to GitHub
51
+ * Build and release gem to https://rubygems.org/
52
+ * Make sure the master branch has an up-to-date changelog. Generate with `rake changelog`. Set `CHANGELOG_GITHUB_TOKEN` to a personal access token to increase the API rate limit. (The changelog uses [GitHub Changelog Generator](https://github.com/skywinder/github-changelog-generator/))
53
+
47
54
  ## License
48
55
 
49
56
  The MIT License (MIT)
data/Rakefile CHANGED
@@ -1,15 +1,21 @@
1
- require 'rake'
2
- require 'bundler/gem_tasks'
1
+ require "rake"
2
+ require "bundler/setup"
3
+ require "bundler/gem_tasks"
3
4
 
4
5
  desc "Run specs"
5
6
  task :spec do
6
- require 'bundler/setup'
7
- require 'rspec/core/rake_task'
7
+ require "rspec/core/rake_task"
8
8
  RSpec::Core::RakeTask.new(:spec) do |t|
9
9
  t.rspec_opts = %w(-fd -c)
10
10
  end
11
11
  end
12
12
 
13
+ require "github_changelog_generator/task"
14
+ GitHubChangelogGenerator::RakeTask.new(:changelog) do |config|
15
+ config.user = "twingly"
16
+ config.project = "twingly-analytics-api-ruby"
17
+ end
18
+
13
19
  desc "Synonym for spec"
14
20
  task :test => :spec
15
21
  desc "Synonym for spec"
@@ -25,7 +25,7 @@ module Twingly
25
25
  end
26
26
 
27
27
  def request_parameters
28
- fail("Missing pattern") unless pattern
28
+ fail("Missing pattern") if pattern.to_s.empty?
29
29
 
30
30
  {
31
31
  :key => client.api_key,
@@ -1,5 +1,5 @@
1
1
  module Twingly
2
2
  module Analytics
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
data/spec/query_spec.rb CHANGED
@@ -11,6 +11,7 @@ describe Query do
11
11
 
12
12
  context "without client" do
13
13
  subject { Query.new }
14
+
14
15
  it "should not work" do
15
16
  expect { subject }.to raise_error(ArgumentError)
16
17
  end
@@ -34,8 +35,9 @@ describe Query do
34
35
  let(:query) { Query.new(@client) }
35
36
 
36
37
  context "with valid pattern" do
37
- before { allow_any_instance_of(Query).to receive(:pattern).and_return('') }
38
+ before { query.pattern = "christmas" }
38
39
  subject { query.url }
40
+
39
41
  it { should include("xmloutputversion=2") }
40
42
  end
41
43
 
@@ -44,10 +46,19 @@ describe Query do
44
46
  expect { query.url }.to raise_error(RuntimeError, "Missing pattern")
45
47
  end
46
48
  end
49
+
50
+ context "with empty pattern" do
51
+ before { query.pattern = "" }
52
+
53
+ it "raises an error" do
54
+ expect { query.url }.to raise_error(RuntimeError, "Missing pattern")
55
+ end
56
+ end
47
57
  end
48
58
 
49
59
  context "with valid pattern" do
50
- before { allow_any_instance_of(Query).to receive(:pattern).and_return('') }
60
+ before { subject.pattern = "christmas" }
61
+
51
62
  it "should add language" do
52
63
  subject.language = "en"
53
64
  expect(subject.request_parameters).to include(documentlang: 'en')
@@ -70,8 +81,9 @@ describe Query do
70
81
  end
71
82
 
72
83
  describe "#pattern" do
84
+ before { subject.pattern = "spotify" }
85
+
73
86
  it "should add searchpattern" do
74
- subject.pattern = 'spotify'
75
87
  expect(subject.url_parameters).to include("searchpattern=spotify")
76
88
  end
77
89
  end
@@ -26,4 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "vcr", "~> 2.6"
27
27
  spec.add_development_dependency "webmock", "~> 1.0"
28
28
  spec.add_development_dependency "rake", "~> 0"
29
+ spec.add_development_dependency "github_changelog_generator", "~> 1.8"
29
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twingly-analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan Eckerström
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-14 00:00:00.000000000 Z
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -114,6 +114,20 @@ dependencies:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: github_changelog_generator
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '1.8'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '1.8'
117
131
  description: Twingly Analytics is a product from Twingly AB
118
132
  email:
119
133
  - johan.eckerstrom@twingly.com
@@ -123,6 +137,7 @@ extra_rdoc_files: []
123
137
  files:
124
138
  - ".gitignore"
125
139
  - ".travis.yml"
140
+ - CHANGELOG.md
126
141
  - Gemfile
127
142
  - LICENSE
128
143
  - README.md