posty_client 1.0.0 → 2.0.0

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 ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Y2U1M2EzMzRkNDBhMGE3NDRiMTgyMmFlN2U2ODA1NTFmNWI0MDY3Mg==
5
+ data.tar.gz: !binary |-
6
+ MGZmYzZkYTBmODVkMzhjYTI3YzliNTJhOTRiNjhhODYyNjFkNjE2NA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZmYwNWUxZGVjMDRhNzMxODc0ZTQ4NmI1NjgzOTQxNzVmYjRlNGVjM2U0N2M0
10
+ YTE0OWM2YzU0NGE2MDEyZTkzMGM0NWIwMDljMDRhNGE5NzY4NTk4NzlkYzYx
11
+ NTlkMTk4YzU3YjM0MDQ2NTBkN2ExZjY4YTIyNDBlZWJmZjIyOTc=
12
+ data.tar.gz: !binary |-
13
+ ZjM4Y2EwOTlmZDRiNDM1NzI1ZmFhZDFlYzhjZWJlM2U0MzY3MjU1YjVkNTdj
14
+ YjI4NTIzM2ViN2M3YmM1OTcwYmE3YzMxOTgyMzc5YTVkM2VhYzZlMTBlZGEw
15
+ N2NlNzlmYWE4YTkzODY3YWQ4OTM3ZDU2MjUzZmFhMzUxOWE1ZGI=
data/README.md CHANGED
@@ -1,67 +1,87 @@
1
- posty_client
2
- ============
1
+ # posty\_client
3
2
 
4
- Client library for the post_api server: https://github.com/posty/posty_api
3
+ posty\_client is a client library and command line tool for the post\_api server: [https://github.com/posty/posty_api](https://github.com/posty/posty_api)
5
4
 
6
- Install
7
- -------
5
+ ## Install
8
6
 
9
- gem install posty_client
7
+ $ gem install posty_client
10
8
 
11
- Usage
12
- -----
9
+ ## Usage
13
10
 
14
- Create at least a configuration file at ~/.posty-cli.yml
11
+ You need to create at least a configuration file at `~/.posty-cli.yml`.
12
+ It contains the details how to connect to your api server.
15
13
 
16
- Cli:
14
+ The cli supplies a command to create a template for you:
17
15
 
18
- ```
19
- $ posty-client help
20
- ```
16
+ $ posty-client create_config
21
17
 
22
- Library:
18
+ ### Cli usage
23
19
 
24
- ```
25
- require 'pp'
20
+ $ posty-client help
26
21
 
27
- ENV['RESTCLIENT_LOG'] = 'stdout'
22
+ ### Library usage examples
28
23
 
29
- $: << '.'
30
- require 'lib/posty_client.rb'
31
24
 
32
- d = PostyClient::Resources::Domain.new('posty-soft1.org')
33
- puts d.name, d.primary_key
34
- pp d.attributes
25
+ require 'pp'
35
26
 
36
- unless d.save
37
- pp d.errors
38
- end
27
+ ENV['RESTCLIENT_LOG'] = 'stdout'
28
+
29
+ $: << '.'
30
+ require 'lib/posty_client.rb'
31
+
32
+ d = PostyClient::Resources::Domain.new('posty-soft1.org')
33
+ puts d.name, d.primary_key
34
+ pp d.attributes
35
+
36
+ unless d.save
37
+ pp d.errors
38
+ end
39
+
40
+ d = PostyClient::Resources::Domain.new('posty-soft.org')
41
+ unless d.save
42
+ pp d.errors
43
+ end
44
+
45
+ puts '--'*10
46
+
47
+ pp d.users
48
+
49
+ puts '*'*20
50
+
51
+ u = PostyClient::Resources::User.new(d, 'to')
52
+ u.attributes['password'] = 'lalalala'
53
+ unless u.save
54
+ pp u.errors
55
+ exit
56
+ end
57
+
58
+ a = PostyClient::Resources::UserAlias.new(u, 'tommy')
59
+ a.attributes['destination'] = 'bheller'
60
+ unless a.save
61
+ pp a.errors
62
+ exit
63
+ end
64
+
65
+ puts '--'*10
66
+ pp u.aliases
39
67
 
40
- d = PostyClient::Resources::Domain.new('posty-soft.org')
41
- unless d.save
42
- pp d.errors
43
- end
68
+ ## Information
44
69
 
45
- puts '--'*10
70
+ For more information about posty please visit our website:
71
+ [www.posty-soft.org](http://www.posty-soft.org)
46
72
 
47
- pp d.users
73
+ ## Support
48
74
 
49
- puts '*'*20
75
+ * IRC
76
+ * Server: irc.freenode.net
77
+ * Channel: #posty
78
+ * Email:
79
+ * support@posty-soft.org
50
80
 
51
- u = PostyClient::Resources::User.new(d, 'to')
52
- u.attributes['password'] = 'lalalala'
53
- unless u.save
54
- pp u.errors
55
- exit
56
- end
81
+ ## Bug reports
57
82
 
58
- a = PostyClient::Resources::UserAlias.new(u, 'tommy')
59
- a.attributes['destination'] = 'bheller'
60
- unless a.save
61
- pp a.errors
62
- exit
63
- end
83
+ If you discover any bugs, feel free to create an issue on GitHub. Please add as much information as possible to help us fixing the possible bug. We also encourage you to help even more by forking and sending us a pull request.
64
84
 
65
- puts '--'*10
66
- pp u.aliases
67
- ```
85
+ ## License
86
+
87
+ MIT License. See LICENSE for details.
@@ -67,9 +67,9 @@ module PostyClient
67
67
  D
68
68
  subcommand "transport", PostyClient::Command::TransportCommand
69
69
 
70
- desc "api_key [SUBCOMMAND]", "perform an action on a api_key"
70
+ desc "api_key [SUBCOMMAND]", "perform an action on an api_key"
71
71
  long_desc <<-D
72
- Perform an action on a api_key. To see available subcommands use 'posty api_key help'
72
+ Perform an action on an api_key. To see available subcommands use 'posty api_key help'
73
73
  D
74
74
  subcommand "api_key", PostyClient::Command::ApiKeyCommand
75
75
  end
@@ -10,9 +10,10 @@ module PostyClient
10
10
  print_table(api_keys)
11
11
  end
12
12
 
13
- desc "add", "add a api key"
14
- def add
13
+ desc "add [EXPIRES_AT]", "add a api key"
14
+ def add(expires_at)
15
15
  api_key = PostyClient::Resources::ApiKey.new("")
16
+ api_key.attributes['expires_at'] = expires_at
16
17
  api_key.create
17
18
  end
18
19
 
@@ -1,3 +1,3 @@
1
1
  module PostyClient
2
- VERSION = "1.0.0"
2
+ VERSION = "2.0.0"
3
3
  end
data/posty_client.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.3"
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
22
  spec.add_development_dependency "rake"
23
23
 
24
24
  spec.add_runtime_dependency "thor"
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: posty_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 2.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Thomas Steinhausen
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-17 00:00:00.000000000 Z
11
+ date: 2014-06-18 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '1.3'
19
+ version: '1.6'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: '1.3'
26
+ version: '1.6'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: thor
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: json
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rest-client
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ! '>='
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ! '>='
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: readwritesettings
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ! '>='
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ! '>='
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: activesupport
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ! '>='
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ! '>='
124
109
  - !ruby/object:Gem::Version
@@ -162,32 +147,25 @@ files:
162
147
  homepage: https://github.com/iaddict/posty_client
163
148
  licenses:
164
149
  - MIT
150
+ metadata: {}
165
151
  post_install_message:
166
152
  rdoc_options: []
167
153
  require_paths:
168
154
  - lib
169
155
  required_ruby_version: !ruby/object:Gem::Requirement
170
- none: false
171
156
  requirements:
172
157
  - - ! '>='
173
158
  - !ruby/object:Gem::Version
174
159
  version: '0'
175
- segments:
176
- - 0
177
- hash: 3693208534755418150
178
160
  required_rubygems_version: !ruby/object:Gem::Requirement
179
- none: false
180
161
  requirements:
181
162
  - - ! '>='
182
163
  - !ruby/object:Gem::Version
183
164
  version: '0'
184
- segments:
185
- - 0
186
- hash: 3693208534755418150
187
165
  requirements: []
188
166
  rubyforge_project:
189
- rubygems_version: 1.8.24
167
+ rubygems_version: 2.2.1
190
168
  signing_key:
191
- specification_version: 3
169
+ specification_version: 4
192
170
  summary: Library and cli for the post api.
193
171
  test_files: []