wordpress_client 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +1065 -0
- data/.ruby-version +1 -0
- data/Gemfile +11 -0
- data/Guardfile +29 -0
- data/LICENSE +21 -0
- data/README.md +63 -0
- data/Rakefile +1 -0
- data/circle.yml +3 -0
- data/lib/wordpress_client.rb +25 -0
- data/lib/wordpress_client/category.rb +4 -0
- data/lib/wordpress_client/client.rb +142 -0
- data/lib/wordpress_client/connection.rb +186 -0
- data/lib/wordpress_client/errors.rb +10 -0
- data/lib/wordpress_client/media.rb +37 -0
- data/lib/wordpress_client/media_parser.rb +48 -0
- data/lib/wordpress_client/paginated_collection.rb +53 -0
- data/lib/wordpress_client/post.rb +62 -0
- data/lib/wordpress_client/post_parser.rb +113 -0
- data/lib/wordpress_client/replace_metadata.rb +81 -0
- data/lib/wordpress_client/replace_terms.rb +62 -0
- data/lib/wordpress_client/rest_parser.rb +17 -0
- data/lib/wordpress_client/tag.rb +4 -0
- data/lib/wordpress_client/term.rb +34 -0
- data/lib/wordpress_client/version.rb +3 -0
- data/spec/category_spec.rb +8 -0
- data/spec/client_spec.rb +411 -0
- data/spec/connection_spec.rb +270 -0
- data/spec/docker/Dockerfile +40 -0
- data/spec/docker/README.md +37 -0
- data/spec/docker/dbdump.sql.gz +0 -0
- data/spec/docker/htaccess +10 -0
- data/spec/docker/restore-dbdump.sh +13 -0
- data/spec/fixtures/category.json +1 -0
- data/spec/fixtures/image-media.json +1 -0
- data/spec/fixtures/invalid-post-id.json +1 -0
- data/spec/fixtures/post-with-forbidden-metadata.json +1 -0
- data/spec/fixtures/post-with-metadata.json +1 -0
- data/spec/fixtures/simple-post.json +1 -0
- data/spec/fixtures/tag.json +1 -0
- data/spec/fixtures/thoughtful.jpg +0 -0
- data/spec/fixtures/validation-error.json +1 -0
- data/spec/integration/attachments_crud_spec.rb +51 -0
- data/spec/integration/categories_spec.rb +60 -0
- data/spec/integration/category_assignment_spec.rb +29 -0
- data/spec/integration/posts_crud_spec.rb +118 -0
- data/spec/integration/posts_finding_spec.rb +86 -0
- data/spec/integration/posts_metadata_spec.rb +27 -0
- data/spec/integration/posts_with_attachments_spec.rb +21 -0
- data/spec/integration/tag_assignment_spec.rb +29 -0
- data/spec/integration/tags_spec.rb +36 -0
- data/spec/media_spec.rb +63 -0
- data/spec/paginated_collection_spec.rb +64 -0
- data/spec/post_spec.rb +114 -0
- data/spec/replace_metadata_spec.rb +56 -0
- data/spec/replace_terms_spec.rb +51 -0
- data/spec/shared_examples/term_examples.rb +37 -0
- data/spec/spec_helper.rb +28 -0
- data/spec/support/docker_runner.rb +49 -0
- data/spec/support/fixtures.rb +19 -0
- data/spec/support/integration_macros.rb +10 -0
- data/spec/support/wordpress_server.rb +103 -0
- data/spec/tag_spec.rb +8 -0
- data/wordpress_client.gemspec +27 -0
- metadata +219 -0
data/spec/tag_spec.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'wordpress_client/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "wordpress_client"
|
8
|
+
spec.version = WordpressClient::VERSION
|
9
|
+
spec.authors = ["Magnus Bergmark", "Rebecca Meritz"]
|
10
|
+
spec.email = ["magnus.bergmark@gmail.com", "rebecca@meritz.com"]
|
11
|
+
spec.summary = "A simple client to the Wordpress API."
|
12
|
+
spec.description = "A simple client to the Wordpress API."
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "faraday", "~> 0.9"
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_development_dependency "rspec", "~> 3.3"
|
26
|
+
spec.add_development_dependency "webmock", "~> 1.22"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,219 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wordpress_client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Magnus Bergmark
|
8
|
+
- Rebecca Meritz
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: faraday
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0.9'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0.9'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: bundler
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.7'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.7'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rake
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '10.0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '10.0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '3.3'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '3.3'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: webmock
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '1.22'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.22'
|
84
|
+
description: A simple client to the Wordpress API.
|
85
|
+
email:
|
86
|
+
- magnus.bergmark@gmail.com
|
87
|
+
- rebecca@meritz.com
|
88
|
+
executables: []
|
89
|
+
extensions: []
|
90
|
+
extra_rdoc_files: []
|
91
|
+
files:
|
92
|
+
- ".gitignore"
|
93
|
+
- ".hound.yml"
|
94
|
+
- ".rubocop.yml"
|
95
|
+
- ".ruby-version"
|
96
|
+
- Gemfile
|
97
|
+
- Guardfile
|
98
|
+
- LICENSE
|
99
|
+
- README.md
|
100
|
+
- Rakefile
|
101
|
+
- circle.yml
|
102
|
+
- lib/wordpress_client.rb
|
103
|
+
- lib/wordpress_client/category.rb
|
104
|
+
- lib/wordpress_client/client.rb
|
105
|
+
- lib/wordpress_client/connection.rb
|
106
|
+
- lib/wordpress_client/errors.rb
|
107
|
+
- lib/wordpress_client/media.rb
|
108
|
+
- lib/wordpress_client/media_parser.rb
|
109
|
+
- lib/wordpress_client/paginated_collection.rb
|
110
|
+
- lib/wordpress_client/post.rb
|
111
|
+
- lib/wordpress_client/post_parser.rb
|
112
|
+
- lib/wordpress_client/replace_metadata.rb
|
113
|
+
- lib/wordpress_client/replace_terms.rb
|
114
|
+
- lib/wordpress_client/rest_parser.rb
|
115
|
+
- lib/wordpress_client/tag.rb
|
116
|
+
- lib/wordpress_client/term.rb
|
117
|
+
- lib/wordpress_client/version.rb
|
118
|
+
- spec/category_spec.rb
|
119
|
+
- spec/client_spec.rb
|
120
|
+
- spec/connection_spec.rb
|
121
|
+
- spec/docker/Dockerfile
|
122
|
+
- spec/docker/README.md
|
123
|
+
- spec/docker/dbdump.sql.gz
|
124
|
+
- spec/docker/htaccess
|
125
|
+
- spec/docker/restore-dbdump.sh
|
126
|
+
- spec/fixtures/category.json
|
127
|
+
- spec/fixtures/image-media.json
|
128
|
+
- spec/fixtures/invalid-post-id.json
|
129
|
+
- spec/fixtures/post-with-forbidden-metadata.json
|
130
|
+
- spec/fixtures/post-with-metadata.json
|
131
|
+
- spec/fixtures/simple-post.json
|
132
|
+
- spec/fixtures/tag.json
|
133
|
+
- spec/fixtures/thoughtful.jpg
|
134
|
+
- spec/fixtures/validation-error.json
|
135
|
+
- spec/integration/attachments_crud_spec.rb
|
136
|
+
- spec/integration/categories_spec.rb
|
137
|
+
- spec/integration/category_assignment_spec.rb
|
138
|
+
- spec/integration/posts_crud_spec.rb
|
139
|
+
- spec/integration/posts_finding_spec.rb
|
140
|
+
- spec/integration/posts_metadata_spec.rb
|
141
|
+
- spec/integration/posts_with_attachments_spec.rb
|
142
|
+
- spec/integration/tag_assignment_spec.rb
|
143
|
+
- spec/integration/tags_spec.rb
|
144
|
+
- spec/media_spec.rb
|
145
|
+
- spec/paginated_collection_spec.rb
|
146
|
+
- spec/post_spec.rb
|
147
|
+
- spec/replace_metadata_spec.rb
|
148
|
+
- spec/replace_terms_spec.rb
|
149
|
+
- spec/shared_examples/term_examples.rb
|
150
|
+
- spec/spec_helper.rb
|
151
|
+
- spec/support/docker_runner.rb
|
152
|
+
- spec/support/fixtures.rb
|
153
|
+
- spec/support/integration_macros.rb
|
154
|
+
- spec/support/wordpress_server.rb
|
155
|
+
- spec/tag_spec.rb
|
156
|
+
- wordpress_client.gemspec
|
157
|
+
homepage: ''
|
158
|
+
licenses:
|
159
|
+
- MIT
|
160
|
+
metadata: {}
|
161
|
+
post_install_message:
|
162
|
+
rdoc_options: []
|
163
|
+
require_paths:
|
164
|
+
- lib
|
165
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0'
|
170
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
requirements: []
|
176
|
+
rubyforge_project:
|
177
|
+
rubygems_version: 2.4.8
|
178
|
+
signing_key:
|
179
|
+
specification_version: 4
|
180
|
+
summary: A simple client to the Wordpress API.
|
181
|
+
test_files:
|
182
|
+
- spec/category_spec.rb
|
183
|
+
- spec/client_spec.rb
|
184
|
+
- spec/connection_spec.rb
|
185
|
+
- spec/docker/Dockerfile
|
186
|
+
- spec/docker/README.md
|
187
|
+
- spec/docker/dbdump.sql.gz
|
188
|
+
- spec/docker/htaccess
|
189
|
+
- spec/docker/restore-dbdump.sh
|
190
|
+
- spec/fixtures/category.json
|
191
|
+
- spec/fixtures/image-media.json
|
192
|
+
- spec/fixtures/invalid-post-id.json
|
193
|
+
- spec/fixtures/post-with-forbidden-metadata.json
|
194
|
+
- spec/fixtures/post-with-metadata.json
|
195
|
+
- spec/fixtures/simple-post.json
|
196
|
+
- spec/fixtures/tag.json
|
197
|
+
- spec/fixtures/thoughtful.jpg
|
198
|
+
- spec/fixtures/validation-error.json
|
199
|
+
- spec/integration/attachments_crud_spec.rb
|
200
|
+
- spec/integration/categories_spec.rb
|
201
|
+
- spec/integration/category_assignment_spec.rb
|
202
|
+
- spec/integration/posts_crud_spec.rb
|
203
|
+
- spec/integration/posts_finding_spec.rb
|
204
|
+
- spec/integration/posts_metadata_spec.rb
|
205
|
+
- spec/integration/posts_with_attachments_spec.rb
|
206
|
+
- spec/integration/tag_assignment_spec.rb
|
207
|
+
- spec/integration/tags_spec.rb
|
208
|
+
- spec/media_spec.rb
|
209
|
+
- spec/paginated_collection_spec.rb
|
210
|
+
- spec/post_spec.rb
|
211
|
+
- spec/replace_metadata_spec.rb
|
212
|
+
- spec/replace_terms_spec.rb
|
213
|
+
- spec/shared_examples/term_examples.rb
|
214
|
+
- spec/spec_helper.rb
|
215
|
+
- spec/support/docker_runner.rb
|
216
|
+
- spec/support/fixtures.rb
|
217
|
+
- spec/support/integration_macros.rb
|
218
|
+
- spec/support/wordpress_server.rb
|
219
|
+
- spec/tag_spec.rb
|