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 +4 -4
- data/app/models/wordpress/option.rb +14 -0
- data/lib/rails_wordpress/version.rb +1 -1
- data/spec/dummy/log/test.log +110 -0
- data/spec/factories/option_factory.rb +7 -0
- data/spec/models/wordpress/option_spec.rb +12 -0
- metadata +6 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50a6a12a900afa83551c391d22194855e8c0a46d
|
4
|
+
data.tar.gz: 3a0a52b9fc8d7860cced26544cd151da1b096c2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/spec/dummy/log/test.log
CHANGED
@@ -17785,3 +17785,113 @@ Mysql2::Error: Unknown column 'wp_posts.user_id' in 'where clause': SELECT `wp_p
|
|
17785
17785
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
17786
17786
|
[1m[36mWordpress::Pagemeta Load (0.2ms)[0m [1mSELECT `wp_postmeta`.* FROM `wp_postmeta` WHERE `wp_postmeta`.`post_id` = 52[0m
|
17787
17787
|
[1m[35m (0.4ms)[0m ROLLBACK
|
17788
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
17789
|
+
[1m[36m (29.7ms)[0m [1mDROP DATABASE IF EXISTS `wp_test`[0m
|
17790
|
+
[1m[35m (4.4ms)[0m CREATE DATABASE `wp_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
|
17791
|
+
[1m[36m (11.7ms)[0m [1mCREATE 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[0m
|
17792
|
+
[1m[35m (11.8ms)[0m CREATE INDEX `comment_id` USING btree ON `wp_commentmeta` (`comment_id`)
|
17793
|
+
[1m[36m (12.9ms)[0m [1mCREATE INDEX `meta_key` USING btree ON `wp_commentmeta` (`meta_key`) [0m
|
17794
|
+
[1m[35m (12.3ms)[0m 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
|
+
[1m[36m (12.4ms)[0m [1mCREATE INDEX `comment_approved_date_gmt` USING btree ON `wp_comments` (`comment_approved`, `comment_date_gmt`) [0m
|
17796
|
+
[1m[35m (11.7ms)[0m CREATE INDEX `comment_author_email` USING btree ON `wp_comments` (`comment_author_email`(10))
|
17797
|
+
[1m[36m (11.6ms)[0m [1mCREATE INDEX `comment_date_gmt` USING btree ON `wp_comments` (`comment_date_gmt`) [0m
|
17798
|
+
[1m[35m (12.3ms)[0m CREATE INDEX `comment_parent` USING btree ON `wp_comments` (`comment_parent`)
|
17799
|
+
[1m[36m (11.4ms)[0m [1mCREATE INDEX `comment_post_ID` USING btree ON `wp_comments` (`comment_post_ID`) [0m
|
17800
|
+
[1m[35m (10.8ms)[0m 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
|
+
[1m[36m (10.3ms)[0m [1mCREATE INDEX `link_visible` USING btree ON `wp_links` (`link_visible`) [0m
|
17802
|
+
[1m[35m (11.4ms)[0m 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
|
+
[1m[36m (12.7ms)[0m [1mCREATE UNIQUE INDEX `option_name` USING btree ON `wp_options` (`option_name`) [0m
|
17804
|
+
[1m[35m (11.0ms)[0m 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
|
+
[1m[36m (12.3ms)[0m [1mCREATE INDEX `meta_key` USING btree ON `wp_postmeta` (`meta_key`) [0m
|
17806
|
+
[1m[35m (12.1ms)[0m CREATE INDEX `post_id` USING btree ON `wp_postmeta` (`post_id`)
|
17807
|
+
[1m[36m (11.0ms)[0m [1mCREATE 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[0m
|
17808
|
+
[1m[35m (11.7ms)[0m CREATE INDEX `post_author` USING btree ON `wp_posts` (`post_author`)
|
17809
|
+
[1m[36m (15.1ms)[0m [1mCREATE INDEX `post_name` USING btree ON `wp_posts` (`post_name`) [0m
|
17810
|
+
[1m[35m (11.9ms)[0m CREATE INDEX `post_parent` USING btree ON `wp_posts` (`post_parent`)
|
17811
|
+
[1m[36m (10.2ms)[0m [1mCREATE INDEX `type_status_date` USING btree ON `wp_posts` (`post_type`, `post_status`, `post_date`, `ID`) [0m
|
17812
|
+
[1m[35m (10.2ms)[0m 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
|
+
[1m[36m (10.9ms)[0m [1mCREATE INDEX `term_taxonomy_id` USING btree ON `wp_term_relationships` (`term_taxonomy_id`) [0m
|
17814
|
+
[1m[35m (9.4ms)[0m 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
|
+
[1m[36m (9.8ms)[0m [1mCREATE INDEX `taxonomy` USING btree ON `wp_term_taxonomy` (`taxonomy`) [0m
|
17816
|
+
[1m[35m (10.5ms)[0m CREATE UNIQUE INDEX `term_id_taxonomy` USING btree ON `wp_term_taxonomy` (`term_id`, `taxonomy`)
|
17817
|
+
[1m[36m (8.8ms)[0m [1mCREATE 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[0m
|
17818
|
+
[1m[35m (11.3ms)[0m CREATE INDEX `name` USING btree ON `wp_terms` (`name`)
|
17819
|
+
[1m[36m (10.5ms)[0m [1mCREATE UNIQUE INDEX `slug` USING btree ON `wp_terms` (`slug`) [0m
|
17820
|
+
[1m[35m (9.9ms)[0m 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
|
+
[1m[36m (10.7ms)[0m [1mCREATE INDEX `meta_key` USING btree ON `wp_usermeta` (`meta_key`) [0m
|
17822
|
+
[1m[35m (9.7ms)[0m CREATE INDEX `user_id` USING btree ON `wp_usermeta` (`user_id`)
|
17823
|
+
[1m[36m (9.8ms)[0m [1mCREATE 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[0m
|
17824
|
+
[1m[35m (10.0ms)[0m CREATE INDEX `user_login_key` USING btree ON `wp_users` (`user_login`)
|
17825
|
+
[1m[36m (11.1ms)[0m [1mCREATE INDEX `user_nicename` USING btree ON `wp_users` (`user_nicename`) [0m
|
17826
|
+
[1m[35m (10.4ms)[0m CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
|
17827
|
+
[1m[36m (14.3ms)[0m [1mCREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`) [0m
|
17828
|
+
[1m[35m (0.2ms)[0m SELECT version FROM `schema_migrations`
|
17829
|
+
[1m[36m (4.1ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('0')[0m
|
17830
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT `schema_migrations`.* FROM `schema_migrations`
|
17831
|
+
[1m[36m (0.2ms)[0m [1mSELECT @@FOREIGN_KEY_CHECKS[0m
|
17832
|
+
[1m[35m (0.1ms)[0m SET FOREIGN_KEY_CHECKS = 0
|
17833
|
+
[1m[36m (380.4ms)[0m [1mSELECT * FROM information_schema.tables[0m
|
17834
|
+
[1m[35m (1.1ms)[0m SELECT table_name FROM information_schema.tables WHERE table_schema = 'wp_test' AND table_rows > 0
|
17835
|
+
[1m[36m (0.1ms)[0m [1mSET FOREIGN_KEY_CHECKS = 1[0m
|
17836
|
+
[1m[35m (0.1ms)[0m BEGIN
|
17837
|
+
[1m[36m (0.1ms)[0m [1mCOMMIT[0m
|
17838
|
+
[1m[35m (0.0ms)[0m BEGIN
|
17839
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
17840
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('Hello', 'World', 'no')
|
17841
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
17842
|
+
[1m[35m (0.7ms)[0m ROLLBACK
|
17843
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
17844
|
+
[1m[36m (22.0ms)[0m [1mDROP DATABASE IF EXISTS `wp_test`[0m
|
17845
|
+
[1m[35m (4.9ms)[0m CREATE DATABASE `wp_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
|
17846
|
+
[1m[36m (11.6ms)[0m [1mCREATE 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[0m
|
17847
|
+
[1m[35m (11.1ms)[0m CREATE INDEX `comment_id` USING btree ON `wp_commentmeta` (`comment_id`)
|
17848
|
+
[1m[36m (11.4ms)[0m [1mCREATE INDEX `meta_key` USING btree ON `wp_commentmeta` (`meta_key`) [0m
|
17849
|
+
[1m[35m (12.0ms)[0m 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
|
+
[1m[36m (11.6ms)[0m [1mCREATE INDEX `comment_approved_date_gmt` USING btree ON `wp_comments` (`comment_approved`, `comment_date_gmt`) [0m
|
17851
|
+
[1m[35m (10.6ms)[0m CREATE INDEX `comment_author_email` USING btree ON `wp_comments` (`comment_author_email`(10))
|
17852
|
+
[1m[36m (10.7ms)[0m [1mCREATE INDEX `comment_date_gmt` USING btree ON `wp_comments` (`comment_date_gmt`) [0m
|
17853
|
+
[1m[35m (11.6ms)[0m CREATE INDEX `comment_parent` USING btree ON `wp_comments` (`comment_parent`)
|
17854
|
+
[1m[36m (11.9ms)[0m [1mCREATE INDEX `comment_post_ID` USING btree ON `wp_comments` (`comment_post_ID`) [0m
|
17855
|
+
[1m[35m (12.0ms)[0m 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
|
+
[1m[36m (11.8ms)[0m [1mCREATE INDEX `link_visible` USING btree ON `wp_links` (`link_visible`) [0m
|
17857
|
+
[1m[35m (12.0ms)[0m 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
|
+
[1m[36m (11.5ms)[0m [1mCREATE UNIQUE INDEX `option_name` USING btree ON `wp_options` (`option_name`) [0m
|
17859
|
+
[1m[35m (12.2ms)[0m 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
|
+
[1m[36m (11.5ms)[0m [1mCREATE INDEX `meta_key` USING btree ON `wp_postmeta` (`meta_key`) [0m
|
17861
|
+
[1m[35m (11.7ms)[0m CREATE INDEX `post_id` USING btree ON `wp_postmeta` (`post_id`)
|
17862
|
+
[1m[36m (12.5ms)[0m [1mCREATE 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[0m
|
17863
|
+
[1m[35m (12.6ms)[0m CREATE INDEX `post_author` USING btree ON `wp_posts` (`post_author`)
|
17864
|
+
[1m[36m (12.6ms)[0m [1mCREATE INDEX `post_name` USING btree ON `wp_posts` (`post_name`) [0m
|
17865
|
+
[1m[35m (11.2ms)[0m CREATE INDEX `post_parent` USING btree ON `wp_posts` (`post_parent`)
|
17866
|
+
[1m[36m (13.4ms)[0m [1mCREATE INDEX `type_status_date` USING btree ON `wp_posts` (`post_type`, `post_status`, `post_date`, `ID`) [0m
|
17867
|
+
[1m[35m (12.2ms)[0m 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
|
+
[1m[36m (11.7ms)[0m [1mCREATE INDEX `term_taxonomy_id` USING btree ON `wp_term_relationships` (`term_taxonomy_id`) [0m
|
17869
|
+
[1m[35m (12.1ms)[0m 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
|
+
[1m[36m (11.9ms)[0m [1mCREATE INDEX `taxonomy` USING btree ON `wp_term_taxonomy` (`taxonomy`) [0m
|
17871
|
+
[1m[35m (12.2ms)[0m CREATE UNIQUE INDEX `term_id_taxonomy` USING btree ON `wp_term_taxonomy` (`term_id`, `taxonomy`)
|
17872
|
+
[1m[36m (12.4ms)[0m [1mCREATE 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[0m
|
17873
|
+
[1m[35m (12.1ms)[0m CREATE INDEX `name` USING btree ON `wp_terms` (`name`)
|
17874
|
+
[1m[36m (12.3ms)[0m [1mCREATE UNIQUE INDEX `slug` USING btree ON `wp_terms` (`slug`) [0m
|
17875
|
+
[1m[35m (10.9ms)[0m 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
|
+
[1m[36m (12.3ms)[0m [1mCREATE INDEX `meta_key` USING btree ON `wp_usermeta` (`meta_key`) [0m
|
17877
|
+
[1m[35m (11.1ms)[0m CREATE INDEX `user_id` USING btree ON `wp_usermeta` (`user_id`)
|
17878
|
+
[1m[36m (11.1ms)[0m [1mCREATE 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[0m
|
17879
|
+
[1m[35m (10.5ms)[0m CREATE INDEX `user_login_key` USING btree ON `wp_users` (`user_login`)
|
17880
|
+
[1m[36m (10.1ms)[0m [1mCREATE INDEX `user_nicename` USING btree ON `wp_users` (`user_nicename`) [0m
|
17881
|
+
[1m[35m (12.4ms)[0m CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
|
17882
|
+
[1m[36m (13.9ms)[0m [1mCREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`) [0m
|
17883
|
+
[1m[35m (0.2ms)[0m SELECT version FROM `schema_migrations`
|
17884
|
+
[1m[36m (5.0ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('0')[0m
|
17885
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT `schema_migrations`.* FROM `schema_migrations`
|
17886
|
+
[1m[36m (0.2ms)[0m [1mSELECT @@FOREIGN_KEY_CHECKS[0m
|
17887
|
+
[1m[35m (0.1ms)[0m SET FOREIGN_KEY_CHECKS = 0
|
17888
|
+
[1m[36m (337.7ms)[0m [1mSELECT * FROM information_schema.tables[0m
|
17889
|
+
[1m[35m (1.1ms)[0m SELECT table_name FROM information_schema.tables WHERE table_schema = 'wp_test' AND table_rows > 0
|
17890
|
+
[1m[36m (0.1ms)[0m [1mSET FOREIGN_KEY_CHECKS = 1[0m
|
17891
|
+
[1m[35m (0.1ms)[0m BEGIN
|
17892
|
+
[1m[36m (0.1ms)[0m [1mCOMMIT[0m
|
17893
|
+
[1m[35m (0.1ms)[0m BEGIN
|
17894
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
17895
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('Hello', 'World', 'no')
|
17896
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
17897
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
@@ -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.
|
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
|