CQHTTP 2.2.0 → 2.2.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: 65528cc8abd63e473e547caef95648ea0d440540
4
- data.tar.gz: 4722139402d52e5db822a9a475dd9a97a21d43b8
3
+ metadata.gz: 1b5d66b4056bcf2687ab4f674d53158541c129e0
4
+ data.tar.gz: 9ab26ffd1617116613f237c77d29d5b87168f77a
5
5
  SHA512:
6
- metadata.gz: dd633ca9de40e980d1999d99311d5ed39869aeb31fd476bb2ad689dc9c58caaf3e50b36e1dab6fd8a5ac4877c5943024f7ca15ff5e1964a1185ad0f87ffa6606
7
- data.tar.gz: 92a0ee773955512a458ae283ae3d2bd0ab3eab0908fadab91b9e7ba44bb05abd46d4c0fa77ecc726836bd3342ae8235f199b51ff82c48d892eeaba0f8734d33a
6
+ metadata.gz: c876bdb54bfcebdbb634af5f728ca6aa3cb440d533db0e24ad0d16afb61eaa74e22c8956e9c2cc421a4b8d3e9d476d3039fab729d53ebfc37768b3949533ab5d
7
+ data.tar.gz: 1e3048a9d669e03a53446742b03ab03f4773e9feebaaeb824d99f05ca577e73fe47aeb4ea601c0b9fb21449e8a8930e49af0020b8c6f7ae3dd673de19173b71a
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ Style/FileName:
2
+ Enabled: false
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in CQHTTP.gemspec
6
6
  gemspec
data/README.en.md CHANGED
@@ -22,6 +22,12 @@ Or install it yourself as:
22
22
 
23
23
  TODO: Write usage instructions here
24
24
 
25
+ ### D-Bus
26
+
27
+ Service: `org.dastudio.qq`
28
+ Object path: `/org/dastudio/qq`
29
+ Interface: `org.dastudio.cqhttp`
30
+
25
31
  ## Development
26
32
 
27
33
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/README.md CHANGED
@@ -22,6 +22,12 @@ gem 'CQHTTP'
22
22
 
23
23
  TODO: 写使用说明
24
24
 
25
+ ### D-Bus
26
+
27
+ Service: `org.dastudio.qq`
28
+ Object path: `/org/dastudio/qq`
29
+ Interface: `org.dastudio.cqhttp`
30
+
25
31
  ## 开发
26
32
 
27
33
  检出这个仓库后,运行 `bin/setup` 来安装依赖关系。然后,运行 `rake spec` 来运行测试。 您还可以运行 `bin/console` 启动交互式提示符(`irb`),让您进行实验。
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "CQHTTP"
3
+ require 'bundler/setup'
4
+ require 'CQHTTP'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "CQHTTP"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
13
+ require 'irb'
14
14
  IRB.start(__FILE__)
data/lib/CQHTTP/api.rb CHANGED
@@ -7,7 +7,7 @@ module CQHTTP
7
7
  #
8
8
  # host: String: API address, like 'http://localhost:5700'
9
9
  # type: Symbol or String, 'get', 'form' or 'json;
10
- def initialize(host: 'http://localhost:5700', way: :form)
10
+ def initialize(host: 'http://localhost:5700', way: :json)
11
11
  @func_list = {}
12
12
  gen
13
13
  @func_list.freeze
@@ -23,8 +23,8 @@ module CQHTTP
23
23
  # uri: URI
24
24
  # params (optional): Hash, url query
25
25
  def self.get(uri, params = nil) # => Hash
26
- puts 'GET URL:', uri if $DEBUG
27
26
  uri.query = URI.encode_www_form params if params
27
+ puts 'GET URL:', uri if $DEBUG
28
28
  error Net::HTTP.get_response(uri)
29
29
  end
30
30
 
@@ -43,6 +43,7 @@ module CQHTTP
43
43
  # body: Hash, post body
44
44
  def self.post_json(uri, body)
45
45
  puts 'POST URL:', uri if $DEBUG
46
+ puts 'POST JSON:', JSON.pretty_generate(body) if $DEBUG
46
47
  error Net::HTTP.post(
47
48
  uri,
48
49
  body.to_json,
@@ -1,3 +1,3 @@
1
1
  module CQHTTP
2
- VERSION = "2.2.0"
2
+ VERSION = '2.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: CQHTTP
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 71e6fd52
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-21 00:00:00.000000000 Z
11
+ date: 2017-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,6 +76,7 @@ extra_rdoc_files: []
76
76
  files:
77
77
  - ".gitignore"
78
78
  - ".rspec"
79
+ - ".rubocop.yml"
79
80
  - CQHTTP.gemspec
80
81
  - Gemfile
81
82
  - README.en.md