metaweblog 0.3.0 → 0.4.0

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
- SHA1:
3
- metadata.gz: 10ce65e088659f024b98d8ada839c89a3747d04c
4
- data.tar.gz: c25d03a119bccc6c9bb777fe045fb9b24877889f
2
+ SHA256:
3
+ metadata.gz: 829a15e160a83414497da7661186978a81f019c36de24ed4796fd8122ced7453
4
+ data.tar.gz: 93f59e35175adffd4b4bd69781f98a8a72af547f3204154d286420fed3ace841
5
5
  SHA512:
6
- metadata.gz: 6e83e9ff0203d84de54da8c0c1d74bed39f0fdabfe04541420a308fb4307722a20014373f0d5f2ad2adfc7dd0783b6c4f6c8ba6e2d4658d655d0d0b48fc711e9
7
- data.tar.gz: da5b44fd8cfb6e934b90cdc5cfec6bea0f1d1677415439e02e3c243e991121eaf8abf723e0f37fd8aa259314561511a4a0af8f0d1a91e9ab497ac1832975f034
6
+ metadata.gz: 74d4b2d70172c039ad637f1679135c7cc8fc6da399aa2e302dcd179710ef059834e9939b85f7ceaaea0014b37bb6e4a9f46d648cac4d81c7845ae6ff107c2cf7
7
+ data.tar.gz: 5fa613249267e8626254727ca49b54ca6fd6c1bdd21a5362e6e1d2cb1c5d16430fb1dee1ff836dc775522f9d368f33e164de74ca78ee0faf0a1b99f1f4be61fd
@@ -1,9 +1,10 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.1.9
5
4
  - 2.2.5
6
5
  - 2.3.1
6
+ - 2.4.0
7
+ - 2.5.0
7
8
  - ruby-head
8
9
 
9
10
  cache: bundler
@@ -14,3 +15,6 @@ before_install:
14
15
  matrix:
15
16
  allow_failures:
16
17
  - rvm: ruby-head
18
+
19
+ notifications:
20
+ email: false
@@ -1,3 +1,7 @@
1
+ # 0.4.0 (2018-01-30)
2
+
3
+ * Update the supported ruby version, 2.2.0 or later.
4
+
1
5
  # 0.3.0 (2016-08-26)
2
6
 
3
7
  * Update the supported ruby version, 2.1.0 or later
@@ -1,4 +1,2 @@
1
- # encoding: utf-8
2
-
3
1
  require 'metaweblog/version'
4
2
  require 'metaweblog/client'
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  require 'metaweblog/post'
4
2
  require 'xmlrpc/client'
5
3
 
@@ -1,10 +1,10 @@
1
- # encoding: utf-8
1
+ require 'time'
2
2
 
3
3
  module MetaWeblog
4
4
 
5
5
  class Post
6
6
  def self.members
7
- [:title, :link, :description, :pubDate]
7
+ %i[title link description pubDate]
8
8
  end
9
9
 
10
10
  def initialize(*args)
@@ -17,7 +17,7 @@ module MetaWeblog
17
17
  data = args
18
18
  end
19
19
  self.class.members.each_with_index do |member, i|
20
- self.__send__ "#{member}=", data[i] if data[i]
20
+ __send__ "#{member}=", data[i] if data[i]
21
21
  end
22
22
  end
23
23
 
@@ -40,14 +40,14 @@ module MetaWeblog
40
40
  end
41
41
 
42
42
  def pub_date=(pub_date)
43
- @data[:pubDate] = case pub_date
43
+ @data[:pubDate] =
44
+ case pub_date
44
45
  when String then Time.parse(pub_date)
45
46
  when Time, DateTime then pub_date
46
47
  else
47
- raise ArgumentError, "The argument is not String, Time and DateTime."
48
+ raise ArgumentError, 'The argument is not String, Time and DateTime.'
48
49
  end
49
50
  end
50
- alias :pubDate= :pub_date=
51
-
51
+ alias pubDate= pub_date=
52
52
  end
53
53
  end
@@ -1,3 +1,3 @@
1
1
  module MetaWeblog
2
- VERSION = "0.3.0"
2
+ VERSION = '0.4.0'.freeze
3
3
  end
@@ -1,33 +1,33 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path(File.join(__dir__, 'lib'))
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'metaweblog/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = "metaweblog"
6
+ spec.name = 'metaweblog'
7
7
  spec.version = MetaWeblog::VERSION
8
- spec.authors = ["Tatsuya Sato"]
9
- spec.email = ["satoryu.1981@gmail.com"]
8
+ spec.authors = ['Tatsuya Sato']
9
+ spec.email = ['satoryu.1981@gmail.com']
10
10
  spec.description = <<-DESC
11
11
  Ruby client for metaWeblog API.
12
12
  This gem makes it easier for developers to talk with your Blog supporting
13
- metaWeblog API.
14
- This gem only depends on REXML provided as one of Ruby's standard lib.
13
+ metaWeblog API.
14
+ This gem only depends on REXML provided as one of Ruby's standard lib.
15
15
  DESC
16
- spec.summary = %q{Ruby client for metaWeblog API.}
17
- spec.homepage = "http://github.com/satoryu/metaweblog"
18
- spec.license = "MIT"
19
- spec.required_ruby_version = '>= 2.1.0'
16
+ spec.summary = 'Ruby client for metaWeblog API.'
17
+ spec.homepage = 'http://github.com/satoryu/metaweblog'
18
+ spec.license = 'MIT'
19
+ spec.required_ruby_version = '>= 2.2.0'
20
20
  spec.rdoc_options = %w[
21
21
  --main=README.md
22
22
  --exclude=Gemfile --exclude=Rakefile --exclude=*.gemspec
23
23
  ]
24
24
 
25
- spec.files = `git ls-files`.split($/)
25
+ spec.files = `git ls-files`.split($RS)
26
26
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
27
27
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
28
- spec.require_paths = ["lib"]
28
+ spec.require_paths = ['lib']
29
29
 
30
- spec.add_development_dependency "bundler"
31
- spec.add_development_dependency "rspec", "~> 3.5.0"
32
- spec.add_development_dependency "rake"
30
+ spec.add_development_dependency 'bundler', '~> 1.16.1'
31
+ spec.add_development_dependency 'rake', '~> 12.3.0'
32
+ spec.add_development_dependency 'rspec', '~> 3.7.0'
33
33
  end
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  require 'spec_helper'
4
2
 
5
3
  describe MetaWeblog::Client do
@@ -28,14 +26,14 @@ describe MetaWeblog::Client do
28
26
  end
29
27
  end
30
28
 
31
- describe "#get" do
29
+ describe '#get' do
32
30
  let(:post_id) { 12345 }
33
31
 
34
32
  before do
35
33
  expect(@xml_client).to receive(:call).with('metaWeblog.getPost', post_id, 'username', 'password')
36
34
  end
37
35
 
38
- it do
36
+ it do
39
37
  expect { @client.get(post_id) }.not_to raise_error
40
38
  end
41
39
  end
@@ -6,7 +6,7 @@ describe MetaWeblog::Post do
6
6
  describe '#initialize' do
7
7
  context 'Given an array of values' do
8
8
  let(:args) do
9
- [ 'title', 'http://blog.example.com/1234', 'desc' ]
9
+ ['title', 'http://blog.example.com/1234', 'desc']
10
10
  end
11
11
 
12
12
  specify '' do
@@ -18,7 +18,7 @@ describe MetaWeblog::Post do
18
18
 
19
19
  context 'Given only a hash' do
20
20
  let(:args) do
21
- [{ :title => 'Hello', 'description' => 'This is blog', :extra => 'not defined' }]
21
+ [{title: 'Hello', 'description' => 'This is blog', extra: 'not defined' }]
22
22
  end
23
23
 
24
24
  specify 'should assign values for members' do
metadata CHANGED
@@ -1,60 +1,62 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metaweblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tatsuya Sato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-26 00:00:00.000000000 Z
11
+ date: 2018-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 1.16.1
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 1.16.1
27
27
  - !ruby/object:Gem::Dependency
28
- name: rspec
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.5.0
33
+ version: 12.3.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 3.5.0
40
+ version: 12.3.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 3.7.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
55
- description: " Ruby client for metaWeblog API.\n This gem makes it easier for
56
- developers to talk with your Blog supporting\n metaWeblog API. \n This gem
57
- only depends on REXML provided as one of Ruby's standard lib. \n"
54
+ version: 3.7.0
55
+ description: |2
56
+ Ruby client for metaWeblog API.
57
+ This gem makes it easier for developers to talk with your Blog supporting
58
+ metaWeblog API.
59
+ This gem only depends on REXML provided as one of Ruby's standard lib.
58
60
  email:
59
61
  - satoryu.1981@gmail.com
60
62
  executables: []
@@ -96,7 +98,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
98
  requirements:
97
99
  - - ">="
98
100
  - !ruby/object:Gem::Version
99
- version: 2.1.0
101
+ version: 2.2.0
100
102
  required_rubygems_version: !ruby/object:Gem::Requirement
101
103
  requirements:
102
104
  - - ">="
@@ -104,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
106
  version: '0'
105
107
  requirements: []
106
108
  rubyforge_project:
107
- rubygems_version: 2.5.1
109
+ rubygems_version: 2.7.3
108
110
  signing_key:
109
111
  specification_version: 4
110
112
  summary: Ruby client for metaWeblog API.