caishu_model 0.1.1 → 0.1.2

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: 24f1625fd7cffdf480445360f9f1f2e93d8c65ce
4
- data.tar.gz: a9694ec5f92495f2420c0423a73d58d4ad6407db
3
+ metadata.gz: c8798f5ec85bb351b7be6601ee8fd16c311cf167
4
+ data.tar.gz: 88604a28fe5caf20b3265379c9b409e0f3d08ca2
5
5
  SHA512:
6
- metadata.gz: 8f1bcda2b5e6f19e5534c818131ee8c49675de064706152d99a42f0772d72536dad0c505986f575aba4cb164e44de56734a7e5d3eede9e247378d26d5281f52f
7
- data.tar.gz: e380dfe44a41eba698448f2762b946de8b153e41fb7d4e45910f53365c5972e837a0bb4a05d6ae3d67454dee51b7686e0150100e740517faa4b0080eb024e9e9
6
+ metadata.gz: cf0e4e241b425446b1f8a7aeb89dd0f30768c386f230c61db69b2f905681e68d3c83afc09528967a0baa9ec3930da704dc84a49b351b9f78882a3d97f2b9411b
7
+ data.tar.gz: 3bd09239a70ffa61010a82eccabc8b20c8682435964b2a0e8c020d30635257d2d4c39252b2b810bb7d4ed267d77d6ba96a3c1f5f0a739ffab827b68d80d386a5
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
- source 'https://rubygems.org'
1
+ source 'http://ruby.taobao.org'
2
2
 
3
3
  # Specify your gem's dependencies in caishu_model.gemspec
4
- gemspec
4
+
5
+ gem 'rake'
6
+ gem 'sinatra'
7
+ gem 'sinatra-activerecord'
8
+ gem 'mysql2'
data/README.md CHANGED
@@ -16,4 +16,6 @@ Or install it yourself as:
16
16
  $ gem install caishu_model
17
17
 
18
18
  ## Usage
19
- 直接使用
19
+ 直接使用
20
+
21
+ rake -T
data/Rakefile CHANGED
@@ -1 +1,5 @@
1
- require "bundler/gem_tasks"
1
+ require 'sinatra'
2
+ require "sinatra/activerecord"
3
+ require "sinatra/activerecord/rake"
4
+
5
+ set :database_file, File.expand_path("../config/database.yml",__FILE__)
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "caishu_model"
8
- spec.version = '0.1.1'
8
+ spec.version = '0.1.2'
9
9
  spec.authors = ["menghuanwd"]
10
10
  spec.email = ["651019063@qq.com"]
11
11
  spec.summary = %q{caishu项目的models}
@@ -19,6 +19,9 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
- spec.add_development_dependency "rake"
23
- spec.add_dependency "activerecord"
24
- end
22
+ # spec.add_development_dependency "rake"
23
+ # spec.add_development_dependency "mysql2"
24
+ # spec.add_development_dependency "sinatra"
25
+ # spec.add_development_dependency "sinatra-activerecord"
26
+
27
+ end
@@ -0,0 +1,9 @@
1
+ development:
2
+ adapter: mysql2
3
+ encoding: utf8
4
+ reconnect: false
5
+ host: localhost
6
+ database: elasticsearch3
7
+ pool: 5
8
+ username: diningcity
9
+ password: dave
@@ -0,0 +1,10 @@
1
+ class CreateCategories < ActiveRecord::Migration
2
+ def change
3
+ create_table :categories do |t|
4
+ t.string :title
5
+ t.string :name
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :username
5
+ t.string :password
6
+ t.string :hashed_password
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,10 @@
1
+ class CreateJokes < ActiveRecord::Migration
2
+ def change
3
+ create_table :jokes do |t|
4
+ t.string :title
5
+ t.text :content
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ class CreatePhotos < ActiveRecord::Migration
2
+ def change
3
+ create_table :photos do |t|
4
+ t.integer :photo_category_id
5
+ t.integer :picture_id
6
+ t.string :title
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class CreatePhotoCategories < ActiveRecord::Migration
2
+ def change
3
+ create_table :photo_categories do |t|
4
+ t.string :title
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateMoods < ActiveRecord::Migration
2
+ def change
3
+ create_table :moods do |t|
4
+ t.text :content
5
+ t.string :picture_id
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ class CreateNotes < ActiveRecord::Migration
2
+ def change
3
+ create_table :notes do |t|
4
+ t.string :title
5
+ t.text :content
6
+ t.string :photos
7
+ t.integer :note_category_id
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class CreateNoteCategories < ActiveRecord::Migration
2
+ def change
3
+ create_table :note_categories do |t|
4
+ t.string :title
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ class CreateTouches < ActiveRecord::Migration
2
+ def change
3
+ create_table :touches do |t|
4
+ t.string :title
5
+ t.integer :picture_id
6
+ t.string :description
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,10 @@
1
+ class CreatePhilosophies < ActiveRecord::Migration
2
+ def change
3
+ create_table :philosophies do |t|
4
+ t.string :title
5
+ t.string :content
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,14 @@
1
+ class CreateGoodfriends < ActiveRecord::Migration
2
+ def change
3
+ create_table :goodfriends do |t|
4
+ t.string :qq
5
+ t.string :weixin
6
+ t.integer :age
7
+ t.integer :gender
8
+ t.string :name
9
+ t.string :telephone
10
+ t.integer :picture_id
11
+ t.timestamps
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ class CreatePictures < ActiveRecord::Migration
2
+ def change
3
+ create_table :pictures do |t|
4
+ t.string :file_key
5
+ t.string :file_name
6
+ t.integer :file_size
7
+ t.string :file_type
8
+ t.string :file_url
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ class CreatePhotoDetails < ActiveRecord::Migration
2
+ def change
3
+ create_table :photo_details do |t|
4
+ t.integer :click_times,:default => 0
5
+ t.integer :download_times,:default => 0
6
+ t.integer :photo_id
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class CreateEnglishes < ActiveRecord::Migration
2
+ def change
3
+ create_table :englishes do |t|
4
+ t.text :content
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ class CreateWeixinMessages < ActiveRecord::Migration
2
+ def change
3
+ create_table :weixin_messages do |t|
4
+ t.string :content
5
+ t.string :report
6
+ t.boolean :status
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,6 @@
1
+ class AddIsDisplayToPhoto < ActiveRecord::Migration
2
+ def change
3
+ add_column :photos, :is_display, :boolean, default: true
4
+
5
+ end
6
+ end
@@ -0,0 +1,134 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140406030204) do
15
+
16
+ create_table "categories", force: true do |t|
17
+ t.string "title"
18
+ t.string "name"
19
+ t.datetime "created_at"
20
+ t.datetime "updated_at"
21
+ end
22
+
23
+ create_table "englishes", force: true do |t|
24
+ t.text "content"
25
+ t.datetime "created_at"
26
+ t.datetime "updated_at"
27
+ end
28
+
29
+ create_table "goodfriends", force: true do |t|
30
+ t.string "qq"
31
+ t.string "weixin"
32
+ t.integer "age"
33
+ t.integer "gender"
34
+ t.string "name"
35
+ t.string "telephone"
36
+ t.integer "picture_id"
37
+ t.datetime "created_at"
38
+ t.datetime "updated_at"
39
+ end
40
+
41
+ create_table "jokes", force: true do |t|
42
+ t.string "title"
43
+ t.text "content"
44
+ t.datetime "created_at"
45
+ t.datetime "updated_at"
46
+ end
47
+
48
+ create_table "moods", force: true do |t|
49
+ t.text "content"
50
+ t.string "picture_id"
51
+ t.datetime "created_at"
52
+ t.datetime "updated_at"
53
+ end
54
+
55
+ create_table "note_categories", force: true do |t|
56
+ t.string "title"
57
+ t.datetime "created_at"
58
+ t.datetime "updated_at"
59
+ end
60
+
61
+ create_table "notes", force: true do |t|
62
+ t.string "title"
63
+ t.text "content"
64
+ t.string "photos"
65
+ t.integer "note_category_id"
66
+ t.datetime "created_at"
67
+ t.datetime "updated_at"
68
+ end
69
+
70
+ create_table "philosophies", force: true do |t|
71
+ t.string "title"
72
+ t.string "content"
73
+ t.datetime "created_at"
74
+ t.datetime "updated_at"
75
+ end
76
+
77
+ create_table "photo_categories", force: true do |t|
78
+ t.string "title"
79
+ t.datetime "created_at"
80
+ t.datetime "updated_at"
81
+ end
82
+
83
+ create_table "photo_details", force: true do |t|
84
+ t.integer "click_times", default: 0
85
+ t.integer "download_times", default: 0
86
+ t.integer "photo_id"
87
+ t.datetime "created_at"
88
+ t.datetime "updated_at"
89
+ end
90
+
91
+ create_table "photos", force: true do |t|
92
+ t.integer "photo_category_id"
93
+ t.integer "picture_id"
94
+ t.string "title"
95
+ t.datetime "created_at"
96
+ t.datetime "updated_at"
97
+ t.boolean "is_display", default: true
98
+ end
99
+
100
+ create_table "pictures", force: true do |t|
101
+ t.string "file_key"
102
+ t.string "file_name"
103
+ t.integer "file_size"
104
+ t.string "file_type"
105
+ t.string "file_url"
106
+ t.datetime "created_at"
107
+ t.datetime "updated_at"
108
+ end
109
+
110
+ create_table "touches", force: true do |t|
111
+ t.string "title"
112
+ t.integer "picture_id"
113
+ t.string "description"
114
+ t.datetime "created_at"
115
+ t.datetime "updated_at"
116
+ end
117
+
118
+ create_table "users", force: true do |t|
119
+ t.string "username"
120
+ t.string "password"
121
+ t.string "hashed_password"
122
+ t.datetime "created_at"
123
+ t.datetime "updated_at"
124
+ end
125
+
126
+ create_table "weixin_messages", force: true do |t|
127
+ t.string "content"
128
+ t.string "report"
129
+ t.boolean "status"
130
+ t.datetime "created_at"
131
+ t.datetime "updated_at"
132
+ end
133
+
134
+ end
metadata CHANGED
@@ -1,57 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caishu_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - menghuanwd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-08 00:00:00.000000000 Z
11
+ date: 2014-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: activerecord
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
27
  description: caishu项目下,dream、wap、weixin、backend所用到的models
56
28
  email:
57
29
  - 651019063@qq.com
@@ -59,12 +31,30 @@ executables: []
59
31
  extensions: []
60
32
  extra_rdoc_files: []
61
33
  files:
62
- - .gitignore
34
+ - ".gitignore"
63
35
  - Gemfile
64
36
  - LICENSE
65
37
  - README.md
66
38
  - Rakefile
67
39
  - caishu_model.gemspec
40
+ - config/database.yml
41
+ - db/migrate/20131228035304_create_categories.rb
42
+ - db/migrate/20131228035434_create_users.rb
43
+ - db/migrate/20131228040423_create_jokes.rb
44
+ - db/migrate/20131228040436_create_photos.rb
45
+ - db/migrate/20131228040446_create_photo_categories.rb
46
+ - db/migrate/20131228040454_create_moods.rb
47
+ - db/migrate/20131228040501_create_notes.rb
48
+ - db/migrate/20131228040507_create_note_categories.rb
49
+ - db/migrate/20131228040512_create_touches.rb
50
+ - db/migrate/20131228040518_create_philosophies.rb
51
+ - db/migrate/20131228062726_create_goodfriends.rb
52
+ - db/migrate/20131229060517_create_pictures.rb
53
+ - db/migrate/20140105151951_create_photo_details.rb
54
+ - db/migrate/20140215021413_create_englishes.rb
55
+ - db/migrate/20140315034952_create_weixin_messages.rb
56
+ - db/migrate/20140406030204_add_is_display_to_photo.rb
57
+ - db/schema.rb
68
58
  - lib/caishu_model.rb
69
59
  - lib/caishu_model/category.rb
70
60
  - lib/caishu_model/english.rb
@@ -92,17 +82,17 @@ require_paths:
92
82
  - lib
93
83
  required_ruby_version: !ruby/object:Gem::Requirement
94
84
  requirements:
95
- - - '>='
85
+ - - ">="
96
86
  - !ruby/object:Gem::Version
97
87
  version: '0'
98
88
  required_rubygems_version: !ruby/object:Gem::Requirement
99
89
  requirements:
100
- - - '>='
90
+ - - ">="
101
91
  - !ruby/object:Gem::Version
102
92
  version: '0'
103
93
  requirements: []
104
94
  rubyforge_project:
105
- rubygems_version: 2.0.3
95
+ rubygems_version: 2.2.2
106
96
  signing_key:
107
97
  specification_version: 4
108
98
  summary: caishu项目的models