hatenablog 0.2.2 → 0.3.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
2
  SHA1:
3
- metadata.gz: f87d69430e84141add234b284afe132a93b62ec2
4
- data.tar.gz: 917bc1f2cfdb6a26c892db351b2826f2ee0a03cb
3
+ metadata.gz: 1784b95efbc79289c1fcaefa30ae898223454a17
4
+ data.tar.gz: 0a57f752ea79980d82cd6fd4d11f020cabcfed24
5
5
  SHA512:
6
- metadata.gz: 274d6839f11d6cf7d74329986e99d09f319137d9fbe751138f645e82e7fe8ccdaa75bb0a8bac3d43a3156cc10866dc5c7c81b4989a46869b4d1e98b3afba152d
7
- data.tar.gz: fdc4ce8d677bcd77edde50acc4f8b743b68fedd841157d076de8d2cfbe9b89bd1d5191f5eb1c55a4e00f88a5b78a884e48bad67dd51e01730b81fe4ef3ccb6ea
6
+ metadata.gz: 7a7e3181855b17a2aa47863c0279eb661f816bc242e90426feb3a67fde522d35c6c8674005be320e4932e1d7230a83255f79de0b899c9204196e9091e9b7d012
7
+ data.tar.gz: d2e5ba03fb472e2e2bae2628c9ea46f0c9a805105849ca10b2d56911235859fd829d1e0940feedf5203c8c86ae6a8760ab75c1878d020ee8cf82fc608705dc6b
data/.travis.yml CHANGED
@@ -5,3 +5,6 @@ rvm:
5
5
  - 2.2.0
6
6
  env:
7
7
  - TZ=Asia/Tokyo
8
+ addons:
9
+ code_climate:
10
+ repo_token: 309cf0784d00d2a6009566d28be111a8a0280cdeb2da280225eedf577b16beb5
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem "codeclimate-test-reporter", group: :test, require: nil
4
+
3
5
  # Specify your gem's dependencies in hatenablog.gemspec
4
6
  gemspec
data/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # Hatenablog [![Build Status](https://travis-ci.org/kymmt90/hatenablog.svg?branch=master)](https://travis-ci.org/kymmt90/hatenablog)
1
+ # Hatenablog
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/hatenablog.svg)](https://badge.fury.io/rb/hatenablog) [![Build Status](https://travis-ci.org/kymmt90/hatenablog.svg?branch=master)](https://travis-ci.org/kymmt90/hatenablog)
4
+ [![Code Climate](https://codeclimate.com/github/kymmt90/hatenablog/badges/gpa.svg)](https://codeclimate.com/github/kymmt90/hatenablog)
5
+ [![Test Coverage](https://codeclimate.com/github/kymmt90/hatenablog/badges/coverage.svg)](https://codeclimate.com/github/kymmt90/hatenablog/coverage)
2
6
 
3
7
  A library for Hatenablog AtomPub API.
4
8
  This gem supports following operations using OAuth authorization:
@@ -55,6 +59,17 @@ user_id: <Hatena user ID>
55
59
  blog_id: <Hatenablog ID>
56
60
  ```
57
61
 
62
+ This file accepts ERB syntax.
63
+
64
+ ```yml
65
+ consumer_key: <%= ENV['CONSUMER_KEY'] %>
66
+ consumer_secret: <%= ENV['CONSUMER_SECRET'] %>
67
+ access_token: <%= ENV['ACCESS_TOKEN'] %>
68
+ access_token_secret: <%= ENV['ACCESS_TOKEN_SECRET'] %>
69
+ user_id: <%= ENV['USER_ID'] %>
70
+ blog_id: <%= ENV['BLOG_ID'] %>
71
+ ```
72
+
58
73
  ## Usage
59
74
 
60
75
  ```ruby
@@ -1,3 +1,4 @@
1
+ require 'erb'
1
2
  require 'yaml'
2
3
 
3
4
  module Hatenablog
@@ -11,7 +12,7 @@ module Hatenablog
11
12
  # @param [String] config_file configuration file path
12
13
  # @return [Hatenablog::Configuration]
13
14
  def initialize(config_file)
14
- config = YAML.load_file(config_file)
15
+ config = YAML.load(ERB.new(File.read(config_file)).result)
15
16
  unless config.has_key?('consumer_key') && config.has_key?('consumer_secret') &&
16
17
  config.has_key?('access_token') && config.has_key?('access_token_secret') &&
17
18
  config.has_key?('user_id') && config.has_key?('blog_id')
@@ -1,3 +1,3 @@
1
1
  module Hatenablog
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hatenablog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kohei Yamamoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2016-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  requirements: []
169
169
  rubyforge_project:
170
- rubygems_version: 2.4.5.1
170
+ rubygems_version: 2.5.1
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: Hatenablog AtomPub API library