rails_wordpress 0.0.6 → 0.0.7

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: d426ea36f9f46b2161ee71befbeaf5011c44da2c
4
- data.tar.gz: e848b57b5dbaf922bef96e9f21a1a92abcfa4d1a
3
+ metadata.gz: 50a6a12a900afa83551c391d22194855e8c0a46d
4
+ data.tar.gz: 3a0a52b9fc8d7860cced26544cd151da1b096c2b
5
5
  SHA512:
6
- metadata.gz: 59d527f1e2f2342d35b89ceb97e62395bb93957e898dc5745e37e1805aa62fdba770736eede2e15b6081384dd8e2fd3714bb28cc8a64d42769d8cd75a61eac1c
7
- data.tar.gz: ac635282a51b89e99c24b7e33d79d1f25477b0ab27a18195d6fe50c195418d7908b4db717a6b613cead60b1fc3cdf37f65af6644bcfb7ba3713e1ef33540e366
6
+ metadata.gz: 4b131cbb55bd43d5d527d9b94cd31315610f16f1b21125558b19fff70a347c0e5ff81d855b084db831c82a3cff3236a9a27e3cd33be35ac097052704152d9fb0
7
+ data.tar.gz: 92801f0f3daa961570d4a2dfef94fc5c6ef64d0df786abb823a4db8c8012f330a746c0c64a64294af56677f0454e5105a3423043ce1afa6854a903a86aa82639
@@ -0,0 +1,14 @@
1
+ # +--------------+---------------------+------+-----+---------+----------------+
2
+ # | Field | Type | Null | Key | Default | Extra |
3
+ # +--------------+---------------------+------+-----+---------+----------------+
4
+ # | option_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
5
+ # | option_name | varchar(64) | NO | UNI | | |
6
+ # | option_value | longtext | NO | | NULL | |
7
+ # | autoload | varchar(20) | NO | MUL | yes | |
8
+ # +--------------+---------------------+------+-----+---------+----------------+
9
+ module Wordpress
10
+ class Option < WpBase
11
+ self.table_name = "wp_options"
12
+ self.primary_key = 'option_id'
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module Wordpress
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -17785,3 +17785,113 @@ Mysql2::Error: Unknown column 'wp_posts.user_id' in 'where clause': SELECT `wp_p
17785
17785
   (0.1ms) RELEASE SAVEPOINT active_record_1
17786
17786
  Wordpress::Pagemeta Load (0.2ms) SELECT `wp_postmeta`.* FROM `wp_postmeta` WHERE `wp_postmeta`.`post_id` = 52
17787
17787
   (0.4ms) ROLLBACK
17788
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT `schema_migrations`.* FROM `schema_migrations`
17789
+  (29.7ms) DROP DATABASE IF EXISTS `wp_test`
17790
+  (4.4ms) CREATE DATABASE `wp_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
17791
+  (11.7ms) CREATE TABLE `wp_commentmeta` (`meta_id` int(11) auto_increment PRIMARY KEY, `comment_id` bigint DEFAULT 0 NOT NULL, `meta_key` varchar(255), `meta_value` longtext) ENGINE=InnoDB
17792
+  (11.8ms) CREATE INDEX `comment_id` USING btree ON `wp_commentmeta` (`comment_id`)
17793
+  (12.9ms) CREATE INDEX `meta_key` USING btree ON `wp_commentmeta` (`meta_key`) 
17794
+  (12.3ms) CREATE TABLE `wp_comments` (`comment_ID` int(11) auto_increment PRIMARY KEY, `comment_post_ID` bigint DEFAULT 0 NOT NULL, `comment_author` tinytext NOT NULL, `comment_author_email` varchar(100) DEFAULT '' NOT NULL, `comment_author_url` varchar(200) DEFAULT '' NOT NULL, `comment_author_IP` varchar(100) DEFAULT '' NOT NULL, `comment_date` datetime NOT NULL, `comment_date_gmt` datetime NOT NULL, `comment_content` text NOT NULL, `comment_karma` int(11) DEFAULT 0 NOT NULL, `comment_approved` varchar(20) DEFAULT '1' NOT NULL, `comment_agent` varchar(255) DEFAULT '' NOT NULL, `comment_type` varchar(20) DEFAULT '' NOT NULL, `comment_parent` bigint DEFAULT 0 NOT NULL, `user_id` bigint DEFAULT 0 NOT NULL) ENGINE=InnoDB
17795
+  (12.4ms) CREATE INDEX `comment_approved_date_gmt` USING btree ON `wp_comments` (`comment_approved`, `comment_date_gmt`) 
17796
+  (11.7ms) CREATE INDEX `comment_author_email` USING btree ON `wp_comments` (`comment_author_email`(10))
17797
+  (11.6ms) CREATE INDEX `comment_date_gmt` USING btree ON `wp_comments` (`comment_date_gmt`) 
17798
+  (12.3ms) CREATE INDEX `comment_parent` USING btree ON `wp_comments` (`comment_parent`)
17799
+  (11.4ms) CREATE INDEX `comment_post_ID` USING btree ON `wp_comments` (`comment_post_ID`) 
17800
+  (10.8ms) CREATE TABLE `wp_links` (`link_id` int(11) auto_increment PRIMARY KEY, `link_url` varchar(255) DEFAULT '' NOT NULL, `link_name` varchar(255) DEFAULT '' NOT NULL, `link_image` varchar(255) DEFAULT '' NOT NULL, `link_target` varchar(25) DEFAULT '' NOT NULL, `link_description` varchar(255) DEFAULT '' NOT NULL, `link_visible` varchar(20) DEFAULT 'Y' NOT NULL, `link_owner` bigint DEFAULT 1 NOT NULL, `link_rating` int(11) DEFAULT 0 NOT NULL, `link_updated` datetime NOT NULL, `link_rel` varchar(255) DEFAULT '' NOT NULL, `link_notes` mediumtext NOT NULL, `link_rss` varchar(255) DEFAULT '' NOT NULL) ENGINE=InnoDB
17801
+  (10.3ms) CREATE INDEX `link_visible` USING btree ON `wp_links` (`link_visible`) 
17802
+  (11.4ms) CREATE TABLE `wp_options` (`option_id` int(11) auto_increment PRIMARY KEY, `option_name` varchar(64) DEFAULT '' NOT NULL, `option_value` longtext NOT NULL, `autoload` varchar(20) DEFAULT 'yes' NOT NULL) ENGINE=InnoDB
17803
+  (12.7ms) CREATE UNIQUE INDEX `option_name` USING btree ON `wp_options` (`option_name`) 
17804
+  (11.0ms) CREATE TABLE `wp_postmeta` (`meta_id` int(11) auto_increment PRIMARY KEY, `post_id` bigint DEFAULT 0 NOT NULL, `meta_key` varchar(255), `meta_value` longtext) ENGINE=InnoDB
17805
+  (12.3ms) CREATE INDEX `meta_key` USING btree ON `wp_postmeta` (`meta_key`) 
17806
+  (12.1ms) CREATE INDEX `post_id` USING btree ON `wp_postmeta` (`post_id`)
17807
+  (11.0ms) CREATE TABLE `wp_posts` (`ID` int(11) auto_increment PRIMARY KEY, `post_author` bigint DEFAULT 0 NOT NULL, `post_date` datetime NOT NULL, `post_date_gmt` datetime NOT NULL, `post_content` longtext NOT NULL, `post_title` text NOT NULL, `post_excerpt` text NOT NULL, `post_status` varchar(20) DEFAULT 'publish' NOT NULL, `comment_status` varchar(20) DEFAULT 'open' NOT NULL, `ping_status` varchar(20) DEFAULT 'open' NOT NULL, `post_password` varchar(20) DEFAULT '' NOT NULL, `post_name` varchar(200) DEFAULT '' NOT NULL, `to_ping` text NOT NULL, `pinged` text NOT NULL, `post_modified` datetime NOT NULL, `post_modified_gmt` datetime NOT NULL, `post_content_filtered` longtext NOT NULL, `post_parent` bigint DEFAULT 0 NOT NULL, `guid` varchar(255) DEFAULT '' NOT NULL, `menu_order` int(11) DEFAULT 0 NOT NULL, `post_type` varchar(20) DEFAULT 'post' NOT NULL, `post_mime_type` varchar(100) DEFAULT '' NOT NULL, `comment_count` bigint DEFAULT 0 NOT NULL) ENGINE=InnoDB
17808
+  (11.7ms) CREATE INDEX `post_author` USING btree ON `wp_posts` (`post_author`)
17809
+  (15.1ms) CREATE INDEX `post_name` USING btree ON `wp_posts` (`post_name`) 
17810
+  (11.9ms) CREATE INDEX `post_parent` USING btree ON `wp_posts` (`post_parent`)
17811
+  (10.2ms) CREATE INDEX `type_status_date` USING btree ON `wp_posts` (`post_type`, `post_status`, `post_date`, `ID`) 
17812
+  (10.2ms) CREATE TABLE `wp_term_relationships` (`object_id` bigint DEFAULT 0 NOT NULL, `term_taxonomy_id` bigint DEFAULT 0 NOT NULL, `term_order` int(11) DEFAULT 0 NOT NULL) ENGINE=InnoDB
17813
+  (10.9ms) CREATE INDEX `term_taxonomy_id` USING btree ON `wp_term_relationships` (`term_taxonomy_id`) 
17814
+  (9.4ms) CREATE TABLE `wp_term_taxonomy` (`term_taxonomy_id` int(11) auto_increment PRIMARY KEY, `term_id` bigint DEFAULT 0 NOT NULL, `taxonomy` varchar(32) DEFAULT '' NOT NULL, `description` longtext NOT NULL, `parent` bigint DEFAULT 0 NOT NULL, `count` bigint DEFAULT 0 NOT NULL) ENGINE=InnoDB
17815
+  (9.8ms) CREATE INDEX `taxonomy` USING btree ON `wp_term_taxonomy` (`taxonomy`) 
17816
+  (10.5ms) CREATE UNIQUE INDEX `term_id_taxonomy` USING btree ON `wp_term_taxonomy` (`term_id`, `taxonomy`)
17817
+  (8.8ms) CREATE TABLE `wp_terms` (`term_id` int(11) auto_increment PRIMARY KEY, `name` varchar(200) DEFAULT '' NOT NULL, `slug` varchar(200) DEFAULT '' NOT NULL, `term_group` bigint DEFAULT 0 NOT NULL) ENGINE=InnoDB
17818
+  (11.3ms) CREATE INDEX `name` USING btree ON `wp_terms` (`name`)
17819
+  (10.5ms) CREATE UNIQUE INDEX `slug` USING btree ON `wp_terms` (`slug`) 
17820
+  (9.9ms) CREATE TABLE `wp_usermeta` (`umeta_id` int(11) auto_increment PRIMARY KEY, `user_id` bigint DEFAULT 0 NOT NULL, `meta_key` varchar(255), `meta_value` longtext) ENGINE=InnoDB
17821
+  (10.7ms) CREATE INDEX `meta_key` USING btree ON `wp_usermeta` (`meta_key`) 
17822
+  (9.7ms) CREATE INDEX `user_id` USING btree ON `wp_usermeta` (`user_id`)
17823
+  (9.8ms) CREATE TABLE `wp_users` (`ID` int(11) auto_increment PRIMARY KEY, `user_login` varchar(60) DEFAULT '' NOT NULL, `user_pass` varchar(64) DEFAULT '' NOT NULL, `user_nicename` varchar(50) DEFAULT '' NOT NULL, `user_email` varchar(100) DEFAULT '' NOT NULL, `user_url` varchar(100) DEFAULT '' NOT NULL, `user_registered` datetime NOT NULL, `user_activation_key` varchar(60) DEFAULT '' NOT NULL, `user_status` int(11) DEFAULT 0 NOT NULL, `display_name` varchar(250) DEFAULT '' NOT NULL) ENGINE=InnoDB
17824
+  (10.0ms) CREATE INDEX `user_login_key` USING btree ON `wp_users` (`user_login`)
17825
+  (11.1ms) CREATE INDEX `user_nicename` USING btree ON `wp_users` (`user_nicename`) 
17826
+  (10.4ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
17827
+  (14.3ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`) 
17828
+  (0.2ms) SELECT version FROM `schema_migrations`
17829
+  (4.1ms) INSERT INTO `schema_migrations` (version) VALUES ('0')
17830
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
17831
+  (0.2ms) SELECT @@FOREIGN_KEY_CHECKS
17832
+  (0.1ms) SET FOREIGN_KEY_CHECKS = 0
17833
+  (380.4ms) SELECT * FROM information_schema.tables
17834
+  (1.1ms) SELECT table_name FROM information_schema.tables WHERE table_schema = 'wp_test' AND table_rows > 0
17835
+  (0.1ms) SET FOREIGN_KEY_CHECKS = 1
17836
+  (0.1ms) BEGIN
17837
+  (0.1ms) COMMIT
17838
+  (0.0ms) BEGIN
17839
+  (0.1ms) SAVEPOINT active_record_1
17840
+ SQL (0.1ms) INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('Hello', 'World', 'no')
17841
+  (0.1ms) RELEASE SAVEPOINT active_record_1
17842
+  (0.7ms) ROLLBACK
17843
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
17844
+  (22.0ms) DROP DATABASE IF EXISTS `wp_test`
17845
+  (4.9ms) CREATE DATABASE `wp_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
17846
+  (11.6ms) CREATE TABLE `wp_commentmeta` (`meta_id` int(11) auto_increment PRIMARY KEY, `comment_id` bigint DEFAULT 0 NOT NULL, `meta_key` varchar(255), `meta_value` longtext) ENGINE=InnoDB
17847
+  (11.1ms) CREATE INDEX `comment_id` USING btree ON `wp_commentmeta` (`comment_id`)
17848
+  (11.4ms) CREATE INDEX `meta_key` USING btree ON `wp_commentmeta` (`meta_key`) 
17849
+  (12.0ms) CREATE TABLE `wp_comments` (`comment_ID` int(11) auto_increment PRIMARY KEY, `comment_post_ID` bigint DEFAULT 0 NOT NULL, `comment_author` tinytext NOT NULL, `comment_author_email` varchar(100) DEFAULT '' NOT NULL, `comment_author_url` varchar(200) DEFAULT '' NOT NULL, `comment_author_IP` varchar(100) DEFAULT '' NOT NULL, `comment_date` datetime NOT NULL, `comment_date_gmt` datetime NOT NULL, `comment_content` text NOT NULL, `comment_karma` int(11) DEFAULT 0 NOT NULL, `comment_approved` varchar(20) DEFAULT '1' NOT NULL, `comment_agent` varchar(255) DEFAULT '' NOT NULL, `comment_type` varchar(20) DEFAULT '' NOT NULL, `comment_parent` bigint DEFAULT 0 NOT NULL, `user_id` bigint DEFAULT 0 NOT NULL) ENGINE=InnoDB
17850
+  (11.6ms) CREATE INDEX `comment_approved_date_gmt` USING btree ON `wp_comments` (`comment_approved`, `comment_date_gmt`) 
17851
+  (10.6ms) CREATE INDEX `comment_author_email` USING btree ON `wp_comments` (`comment_author_email`(10))
17852
+  (10.7ms) CREATE INDEX `comment_date_gmt` USING btree ON `wp_comments` (`comment_date_gmt`) 
17853
+  (11.6ms) CREATE INDEX `comment_parent` USING btree ON `wp_comments` (`comment_parent`)
17854
+  (11.9ms) CREATE INDEX `comment_post_ID` USING btree ON `wp_comments` (`comment_post_ID`) 
17855
+  (12.0ms) CREATE TABLE `wp_links` (`link_id` int(11) auto_increment PRIMARY KEY, `link_url` varchar(255) DEFAULT '' NOT NULL, `link_name` varchar(255) DEFAULT '' NOT NULL, `link_image` varchar(255) DEFAULT '' NOT NULL, `link_target` varchar(25) DEFAULT '' NOT NULL, `link_description` varchar(255) DEFAULT '' NOT NULL, `link_visible` varchar(20) DEFAULT 'Y' NOT NULL, `link_owner` bigint DEFAULT 1 NOT NULL, `link_rating` int(11) DEFAULT 0 NOT NULL, `link_updated` datetime NOT NULL, `link_rel` varchar(255) DEFAULT '' NOT NULL, `link_notes` mediumtext NOT NULL, `link_rss` varchar(255) DEFAULT '' NOT NULL) ENGINE=InnoDB
17856
+  (11.8ms) CREATE INDEX `link_visible` USING btree ON `wp_links` (`link_visible`) 
17857
+  (12.0ms) CREATE TABLE `wp_options` (`option_id` int(11) auto_increment PRIMARY KEY, `option_name` varchar(64) DEFAULT '' NOT NULL, `option_value` longtext NOT NULL, `autoload` varchar(20) DEFAULT 'yes' NOT NULL) ENGINE=InnoDB
17858
+  (11.5ms) CREATE UNIQUE INDEX `option_name` USING btree ON `wp_options` (`option_name`) 
17859
+  (12.2ms) CREATE TABLE `wp_postmeta` (`meta_id` int(11) auto_increment PRIMARY KEY, `post_id` bigint DEFAULT 0 NOT NULL, `meta_key` varchar(255), `meta_value` longtext) ENGINE=InnoDB
17860
+  (11.5ms) CREATE INDEX `meta_key` USING btree ON `wp_postmeta` (`meta_key`) 
17861
+  (11.7ms) CREATE INDEX `post_id` USING btree ON `wp_postmeta` (`post_id`)
17862
+  (12.5ms) CREATE TABLE `wp_posts` (`ID` int(11) auto_increment PRIMARY KEY, `post_author` bigint DEFAULT 0 NOT NULL, `post_date` datetime NOT NULL, `post_date_gmt` datetime NOT NULL, `post_content` longtext NOT NULL, `post_title` text NOT NULL, `post_excerpt` text NOT NULL, `post_status` varchar(20) DEFAULT 'publish' NOT NULL, `comment_status` varchar(20) DEFAULT 'open' NOT NULL, `ping_status` varchar(20) DEFAULT 'open' NOT NULL, `post_password` varchar(20) DEFAULT '' NOT NULL, `post_name` varchar(200) DEFAULT '' NOT NULL, `to_ping` text NOT NULL, `pinged` text NOT NULL, `post_modified` datetime NOT NULL, `post_modified_gmt` datetime NOT NULL, `post_content_filtered` longtext NOT NULL, `post_parent` bigint DEFAULT 0 NOT NULL, `guid` varchar(255) DEFAULT '' NOT NULL, `menu_order` int(11) DEFAULT 0 NOT NULL, `post_type` varchar(20) DEFAULT 'post' NOT NULL, `post_mime_type` varchar(100) DEFAULT '' NOT NULL, `comment_count` bigint DEFAULT 0 NOT NULL) ENGINE=InnoDB
17863
+  (12.6ms) CREATE INDEX `post_author` USING btree ON `wp_posts` (`post_author`)
17864
+  (12.6ms) CREATE INDEX `post_name` USING btree ON `wp_posts` (`post_name`) 
17865
+  (11.2ms) CREATE INDEX `post_parent` USING btree ON `wp_posts` (`post_parent`)
17866
+  (13.4ms) CREATE INDEX `type_status_date` USING btree ON `wp_posts` (`post_type`, `post_status`, `post_date`, `ID`) 
17867
+  (12.2ms) CREATE TABLE `wp_term_relationships` (`object_id` bigint DEFAULT 0 NOT NULL, `term_taxonomy_id` bigint DEFAULT 0 NOT NULL, `term_order` int(11) DEFAULT 0 NOT NULL) ENGINE=InnoDB
17868
+  (11.7ms) CREATE INDEX `term_taxonomy_id` USING btree ON `wp_term_relationships` (`term_taxonomy_id`) 
17869
+  (12.1ms) CREATE TABLE `wp_term_taxonomy` (`term_taxonomy_id` int(11) auto_increment PRIMARY KEY, `term_id` bigint DEFAULT 0 NOT NULL, `taxonomy` varchar(32) DEFAULT '' NOT NULL, `description` longtext NOT NULL, `parent` bigint DEFAULT 0 NOT NULL, `count` bigint DEFAULT 0 NOT NULL) ENGINE=InnoDB
17870
+  (11.9ms) CREATE INDEX `taxonomy` USING btree ON `wp_term_taxonomy` (`taxonomy`) 
17871
+  (12.2ms) CREATE UNIQUE INDEX `term_id_taxonomy` USING btree ON `wp_term_taxonomy` (`term_id`, `taxonomy`)
17872
+  (12.4ms) CREATE TABLE `wp_terms` (`term_id` int(11) auto_increment PRIMARY KEY, `name` varchar(200) DEFAULT '' NOT NULL, `slug` varchar(200) DEFAULT '' NOT NULL, `term_group` bigint DEFAULT 0 NOT NULL) ENGINE=InnoDB
17873
+  (12.1ms) CREATE INDEX `name` USING btree ON `wp_terms` (`name`)
17874
+  (12.3ms) CREATE UNIQUE INDEX `slug` USING btree ON `wp_terms` (`slug`) 
17875
+  (10.9ms) CREATE TABLE `wp_usermeta` (`umeta_id` int(11) auto_increment PRIMARY KEY, `user_id` bigint DEFAULT 0 NOT NULL, `meta_key` varchar(255), `meta_value` longtext) ENGINE=InnoDB
17876
+  (12.3ms) CREATE INDEX `meta_key` USING btree ON `wp_usermeta` (`meta_key`) 
17877
+  (11.1ms) CREATE INDEX `user_id` USING btree ON `wp_usermeta` (`user_id`)
17878
+  (11.1ms) CREATE TABLE `wp_users` (`ID` int(11) auto_increment PRIMARY KEY, `user_login` varchar(60) DEFAULT '' NOT NULL, `user_pass` varchar(64) DEFAULT '' NOT NULL, `user_nicename` varchar(50) DEFAULT '' NOT NULL, `user_email` varchar(100) DEFAULT '' NOT NULL, `user_url` varchar(100) DEFAULT '' NOT NULL, `user_registered` datetime NOT NULL, `user_activation_key` varchar(60) DEFAULT '' NOT NULL, `user_status` int(11) DEFAULT 0 NOT NULL, `display_name` varchar(250) DEFAULT '' NOT NULL) ENGINE=InnoDB
17879
+  (10.5ms) CREATE INDEX `user_login_key` USING btree ON `wp_users` (`user_login`)
17880
+  (10.1ms) CREATE INDEX `user_nicename` USING btree ON `wp_users` (`user_nicename`) 
17881
+  (12.4ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
17882
+  (13.9ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`) 
17883
+  (0.2ms) SELECT version FROM `schema_migrations`
17884
+  (5.0ms) INSERT INTO `schema_migrations` (version) VALUES ('0')
17885
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
17886
+  (0.2ms) SELECT @@FOREIGN_KEY_CHECKS
17887
+  (0.1ms) SET FOREIGN_KEY_CHECKS = 0
17888
+  (337.7ms) SELECT * FROM information_schema.tables
17889
+  (1.1ms) SELECT table_name FROM information_schema.tables WHERE table_schema = 'wp_test' AND table_rows > 0
17890
+  (0.1ms) SET FOREIGN_KEY_CHECKS = 1
17891
+  (0.1ms) BEGIN
17892
+  (0.1ms) COMMIT
17893
+  (0.1ms) BEGIN
17894
+  (0.1ms) SAVEPOINT active_record_1
17895
+ SQL (0.2ms) INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('Hello', 'World', 'no')
17896
+  (0.1ms) RELEASE SAVEPOINT active_record_1
17897
+  (0.3ms) ROLLBACK
@@ -0,0 +1,7 @@
1
+ FactoryGirl.define do
2
+ factory :option, class: Wordpress::Option do
3
+ option_name "Foobar"
4
+ option_value "Foobar"
5
+ autoload "no"
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ require 'rails_helper'
2
+
3
+ module Wordpress
4
+ RSpec.describe Option, type: :model do
5
+ let(:option) { create(:option, option_name: "Hello", option_value: "World") }
6
+ it "should create hello option" do
7
+ expect(option.option_name).to eq "Hello"
8
+ expect(option.option_value).to eq "World"
9
+ expect(option.id).to eq option.option_id
10
+ end
11
+ end
12
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_wordpress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Lang
@@ -154,6 +154,7 @@ files:
154
154
  - app/models/wordpress/attachment.rb
155
155
  - app/models/wordpress/category.rb
156
156
  - app/models/wordpress/link_category.rb
157
+ - app/models/wordpress/option.rb
157
158
  - app/models/wordpress/page.rb
158
159
  - app/models/wordpress/pagemeta.rb
159
160
  - app/models/wordpress/post.rb
@@ -214,6 +215,7 @@ files:
214
215
  - spec/factories/attachment_factory.rb
215
216
  - spec/factories/category_factory.rb
216
217
  - spec/factories/link_category_factory.rb
218
+ - spec/factories/option_factory.rb
217
219
  - spec/factories/page_factory.rb
218
220
  - spec/factories/pagemeta_factory.rb
219
221
  - spec/factories/post_factory.rb
@@ -229,6 +231,7 @@ files:
229
231
  - spec/models/wordpress/attachment_spec.rb
230
232
  - spec/models/wordpress/category_spec.rb
231
233
  - spec/models/wordpress/link_category_spec.rb
234
+ - spec/models/wordpress/option_spec.rb
232
235
  - spec/models/wordpress/page_spec.rb
233
236
  - spec/models/wordpress/pagemeta_spec.rb
234
237
  - spec/models/wordpress/post_spec.rb
@@ -310,6 +313,7 @@ test_files:
310
313
  - spec/factories/attachment_factory.rb
311
314
  - spec/factories/category_factory.rb
312
315
  - spec/factories/link_category_factory.rb
316
+ - spec/factories/option_factory.rb
313
317
  - spec/factories/page_factory.rb
314
318
  - spec/factories/pagemeta_factory.rb
315
319
  - spec/factories/post_factory.rb
@@ -325,6 +329,7 @@ test_files:
325
329
  - spec/models/wordpress/attachment_spec.rb
326
330
  - spec/models/wordpress/category_spec.rb
327
331
  - spec/models/wordpress/link_category_spec.rb
332
+ - spec/models/wordpress/option_spec.rb
328
333
  - spec/models/wordpress/page_spec.rb
329
334
  - spec/models/wordpress/pagemeta_spec.rb
330
335
  - spec/models/wordpress/post_spec.rb