File tree 7 files changed +524
-0
lines changed
7 files changed +524
-0
lines changed Original file line number Diff line number Diff line change
1
+ * .gem
2
+ * .rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc /
11
+ lib /bundler /man
12
+ pkg
13
+ rdoc
14
+ spec /reports
15
+ test /tmp
16
+ test /version_tmp
17
+ tmp
18
+ vendor /
Original file line number Diff line number Diff line change
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mongodb.gemspec
4
+ gemspec
5
+
6
+ gem 'tdiary' , github : 'tdiary/tdiary-core'
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
1
+ # TDiary::IO::MongoDB
2
+
3
+ mongoid adapter for tDiary
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'tdiary-io-mongodb'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install tdiary-io-mongodb
18
+
19
+ ## Usage
20
+
21
+ Add follow snipet to your tdiary.conf
22
+
23
+ ``` ruby
24
+ @io_class = TDiary ::IO ::MongoDB
25
+ ```
26
+
27
+ ## Contributing
28
+
29
+ 1 . Fork it
30
+ 2 . Create your feature branch (` git checkout -b my-new-feature ` )
31
+ 3 . Commit your changes (` git commit -am 'Add some feature' ` )
32
+ 4 . Push to the branch (` git push origin my-new-feature ` )
33
+ 5 . Create new Pull Request
Original file line number Diff line number Diff line change
1
+ require "bundler/gem_tasks"
Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # mongodb.rb: MongoDB IO for tDiary 3.x
4
+ #
5
+ # NAME mongodb
6
+ #
7
+ # DESCRIPTION tDiary IO class on MongoDB
8
+ # Saving Diary data to MongoDB, but Referer data
9
+ #
10
+ # Copyright (C) 2013 TADA Tadashi <[email protected] >
11
+ #
12
+ # You can distribute this under GPL.
13
+
14
+ require 'tdiary/io/base'
15
+ require 'tempfile'
16
+
17
+ module TDiary
18
+ module IO
19
+ module Comment
20
+ def restore_comment ( diaries )
21
+ # not implemented yet
22
+ return
23
+ end
24
+
25
+ def store_comment ( diaries )
26
+ # not implemented yet
27
+ return
28
+ end
29
+ end
30
+
31
+ module Referer
32
+ def restore_referer ( diaries )
33
+ # not implemented yet
34
+ return
35
+ end
36
+
37
+ def store_referer ( diaries )
38
+ # not implemented yet
39
+ return
40
+ end
41
+ end
42
+
43
+ class MongoDB < Base
44
+ include Comment
45
+ include Referer
46
+ include Cache
47
+
48
+ class << self
49
+ def load_cgi_conf ( conf )
50
+ # not implemented yet
51
+ return
52
+ end
53
+
54
+ def save_cgi_conf ( conf , result )
55
+ # not implemented yet
56
+ return
57
+ end
58
+
59
+ def db ( conf )
60
+ # not implemented yet
61
+ return
62
+ end
63
+ end
64
+
65
+ #
66
+ # block must be return boolean which dirty diaries.
67
+ #
68
+ def transaction ( date )
69
+ # not implemented yet
70
+ return
71
+ end
72
+
73
+ def calendar
74
+ # not implemented yet
75
+ return
76
+ end
77
+
78
+ def cache_dir
79
+ # not implemented yet
80
+ return
81
+ end
82
+
83
+ private
84
+
85
+ def restore ( date , diaries , month = true )
86
+ # not implemented yet
87
+ return
88
+ end
89
+
90
+ def store ( diaries )
91
+ # not implemented yet
92
+ return
93
+ end
94
+
95
+ def db
96
+ # not implemented yet
97
+ return
98
+ end
99
+ end
100
+ end
101
+ end
Original file line number Diff line number Diff line change
1
+ # coding: utf-8
2
+ lib = File . expand_path ( '../lib' , __FILE__ )
3
+ $LOAD_PATH. unshift ( lib ) unless $LOAD_PATH. include? ( lib )
4
+
5
+ Gem ::Specification . new do |spec |
6
+ spec . name = "tdiary-io-mongodb"
7
+ spec . version = "0.0.1"
8
+ spec . authors = [ "TADA Tadashi" ]
9
+ spec . email = [ "[email protected] " ]
10
+ spec . description = %q{MongoDB adapter for tDiary}
11
+ spec . summary = %q{MongoDB adapter for tDiary}
12
+ spec . homepage = "https://github.com/tdiary/tdiary-io-mongodb"
13
+ spec . license = "GPL"
14
+
15
+ spec . files = `git ls-files` . split ( $/)
16
+ spec . executables = spec . files . grep ( %r{^bin/} ) { |f | File . basename ( f ) }
17
+ spec . test_files = spec . files . grep ( %r{^(test|spec|features)/} )
18
+ spec . require_paths = [ "lib" ]
19
+
20
+ spec . add_dependency "mongoid"
21
+
22
+ spec . add_development_dependency "bundler" , "~> 1.3"
23
+ spec . add_development_dependency "rake"
24
+ spec . add_development_dependency "rspec"
25
+ end
You can’t perform that action at this time.
0 commit comments