feedcellar 0.4.0 → 0.4.1

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: 043688575adc2059f4f67363860f3f200efd2008
4
- data.tar.gz: 15b35303185ebc4c4267d2b2125dc71a3393e948
3
+ metadata.gz: dcfa9e77897b4d4d13dfb10c1d9f790c81a7af69
4
+ data.tar.gz: 8cca83a201985ae667e952db218b905b90aae003
5
5
  SHA512:
6
- metadata.gz: f6dacd8a9f1b500b211038399634153ee7fcd0066d6d0300f3efbd7b655620d2fc0b8a4e7add5430c0075222e8b9eeaf37edda0db55ceab8e442df4f69f3aea0
7
- data.tar.gz: cac123ca7f2c0bf5d2c1a317bc36f068df440d77209718f7b8ae114004e9cf8ba51cda4079bb3aca0e3ab6cbe6fdeae20824f679e634da25744bf35b32d5cd11
6
+ metadata.gz: d6e20797bb035fd7047da253b321c58d3b384b6e5e6bf13517eab8c175dc8451a5ae5bbcd8a47c09fa55aa3d475f0395b0c732284134aa8e97a2f3252b8f0c20
7
+ data.tar.gz: 5709b3c2cba9482a236d2360158f1dd1a039fa22749289fb059fb1b610f1a18be5187c717aaa4e30f28bacca41fb1eb7e3b845364007bcef0bc82f2ed0b349f2
@@ -2,5 +2,6 @@ rvm:
2
2
  - 1.9.3
3
3
  - 2.0.0
4
4
  - 2.1
5
+ - 2.2
5
6
  before_install:
6
7
  - curl --silent --location https://github.com/groonga/groonga/raw/master/data/travis/setup.sh | sh
File without changes
data/NEWS.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # NEWS
2
2
 
3
+ ## 0.4.1: 2015-04-04
4
+
5
+ Support to paginate!
6
+
7
+ ### Changes
8
+
9
+ * Improvements
10
+ * web: Added /register.opml root.
11
+ * web: Added %p to the feed list.
12
+ * Use Padrino::Helpers.
13
+ * Introduced to paginate.
14
+
3
15
  ## 0.4.0: 2014-08-29
4
16
 
5
17
  Browser and GUI support!
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # feedcellar - a feed reader
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/feedcellar.svg)](http://badge.fury.io/rb/feedcellar)
3
4
  [![Build Status](https://secure.travis-ci.org/myokoym/feedcellar.png?branch=master)](http://travis-ci.org/myokoym/feedcellar)
4
5
 
5
6
  Feedcellar is a full-text searchable RSS feed reader and data store.
@@ -12,16 +13,6 @@ Powered by [Groonga][] (via [Rroonga][]) with [Ruby][].
12
13
 
13
14
  ## Installation
14
15
 
15
- Add this line to your application's Gemfile:
16
-
17
- gem 'feedcellar'
18
-
19
- And then execute:
20
-
21
- $ bundle
22
-
23
- Or install it yourself as:
24
-
25
16
  $ gem install feedcellar
26
17
 
27
18
  ## Usage
@@ -52,7 +43,7 @@ Or install it yourself as:
52
43
 
53
44
  ### Word search from titles and descriptions
54
45
 
55
- $ feedcellar search ruby
46
+ $ feedcellar search WORD1 [WORD2...]
56
47
 
57
48
  ### Show feeds in a web browser
58
49
 
@@ -92,7 +83,7 @@ Copyright (c) 2013-2014 Masafumi Yokoyama `<myokoym@gmail.com>`
92
83
 
93
84
  LGPLv2.1 or later.
94
85
 
95
- See 'license/lgpl-2.1.txt' or 'http://www.gnu.org/licenses/lgpl-2.1' for details.
86
+ See 'LICENSE.txt' or 'http://www.gnu.org/licenses/lgpl-2.1' for details.
96
87
 
97
88
  ## Contributing
98
89
 
data/Rakefile CHANGED
@@ -1,3 +1,21 @@
1
+ # Rakefile
2
+ #
3
+ # Copyright (C) 2013 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "bundler/gem_tasks"
2
20
 
3
21
  desc "Run test"
@@ -1,4 +1,22 @@
1
1
  #!/usr/bin/env ruby
2
+ #
3
+ # executable: feedcellar
4
+ #
5
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
6
+ #
7
+ # This library is free software; you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation; either
10
+ # version 2.1 of the License, or (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ # Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public
18
+ # License along with this library; if not, write to the Free Software
19
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2
20
 
3
21
  require "feedcellar/command"
4
22
 
@@ -1,4 +1,22 @@
1
1
  #!/usr/bin/env ruby
2
+ #
3
+ # executable: feedcellar-clear-cache
4
+ #
5
+ # Copyright (C) 2014 Masafumi Yokoyama <myokoym@gmail.com>
6
+ #
7
+ # This library is free software; you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation; either
10
+ # version 2.1 of the License, or (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ # Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public
18
+ # License along with this library; if not, write to the Free Software
19
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2
20
 
3
21
  require "racknga"
4
22
  require "racknga/cache_database"
data/config.ru CHANGED
@@ -1,3 +1,21 @@
1
+ # config.ru
2
+ #
3
+ # Copyright (C) 2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  base_dir = File.expand_path(File.dirname(__FILE__))
2
20
  lib_dir = File.join(base_dir, "lib")
3
21
  $LOAD_PATH.unshift(lib_dir)
@@ -1,4 +1,23 @@
1
1
  # coding: utf-8
2
+ #
3
+ # feedcellar.gemspec
4
+ #
5
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
6
+ #
7
+ # This library is free software; you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation; either
10
+ # version 2.1 of the License, or (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ # Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public
18
+ # License along with this library; if not, write to the Free Software
19
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
+
2
21
  lib = File.expand_path('../lib', __FILE__)
3
22
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
23
  require 'feedcellar/version'
@@ -22,6 +41,8 @@ Gem::Specification.new do |spec|
22
41
  spec.add_runtime_dependency("thor")
23
42
  #spec.add_runtime_dependency("gtk2")
24
43
  spec.add_runtime_dependency("sinatra")
44
+ spec.add_runtime_dependency("padrino-helpers")
45
+ spec.add_runtime_dependency("kaminari")
25
46
  spec.add_runtime_dependency("haml")
26
47
  spec.add_runtime_dependency("launchy")
27
48
  spec.add_runtime_dependency("racknga")
@@ -1,3 +1,21 @@
1
+ # modlue Feedcellar
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "feedcellar/version"
2
20
  require "feedcellar/groonga_database"
3
21
  require "feedcellar/opml"
@@ -1,3 +1,21 @@
1
+ # class Feedcellar::Command
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "thor"
2
20
  require "feedcellar/version"
3
21
  require "feedcellar/groonga_database"
@@ -1,3 +1,21 @@
1
+ # module Feedcellar::CursesView
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "curses"
2
20
 
3
21
  module Feedcellar
@@ -1,3 +1,21 @@
1
+ # class Feedcellar::Feed
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "rss"
2
20
 
3
21
  module Feedcellar
@@ -1,3 +1,21 @@
1
+ # class Feedcellar::GroongaDatabase
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "groonga"
2
20
 
3
21
  module Feedcellar
@@ -113,7 +131,7 @@ module Feedcellar
113
131
 
114
132
  schema.create_table("Terms",
115
133
  :type => :patricia_trie,
116
- :key_normalize => true,
134
+ :normalizer => "NormalizerAuto",
117
135
  :default_tokenizer => "TokenBigram") do |table|
118
136
  table.index("Feeds.title")
119
137
  table.index("Feeds.description")
@@ -166,7 +184,7 @@ module Feedcellar
166
184
 
167
185
  schema.create_table("Terms",
168
186
  :type => :patricia_trie,
169
- :key_normalize => true,
187
+ :normalizer => "NormalizerAuto",
170
188
  :default_tokenizer => "TokenBigram") do |table|
171
189
  table.index("Feeds.title")
172
190
  table.index("Feeds.description")
@@ -1,3 +1,21 @@
1
+ # class Feedcellar::GroongaSearcher
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  module Feedcellar
2
20
  class GroongaSearcher
3
21
  class << self
@@ -1,3 +1,21 @@
1
+ # class Feedcellar::Opml
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "rexml/document"
2
20
 
3
21
  module Feedcellar
@@ -1,3 +1,21 @@
1
+ # class Feedcellar::Resource
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "rss"
2
20
 
3
21
  module Feedcellar
@@ -1,3 +1,5 @@
1
+ # class Feedcellar::TreeView
2
+ #
1
3
  # Copyright (C) 2014 Masafumi Yokoyama <myokoym@gmail.com>
2
4
  #
3
5
  # This library is free software; you can redistribute it and/or
@@ -1,3 +1,21 @@
1
+ # constant Feedcellar::VERSION
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  module Feedcellar
2
- VERSION = "0.4.0"
20
+ VERSION = "0.4.1"
3
21
  end
@@ -6,8 +6,11 @@
6
6
  - if @feeds
7
7
  %p
8
8
  - grouping(@feeds).each do |resource|
9
- = markup_drilled_item(resource)
9
+ = link_to(drilled_label(resource), drilled_url(resource))
10
+ = paginate(@paginated_feeds)
10
11
  %ul
11
- - @feeds.each do |feed|
12
+ - @paginated_feeds.each do |feed|
12
13
  %li
13
- %a{:href => feed.link}= "#{feed.title} - #{feed.resource.title}"
14
+ %p
15
+ = link_to("#{feed.title} - #{feed.resource.title}", feed.link)
16
+ = paginate(@paginated_feeds)
@@ -1,9 +1,31 @@
1
+ # class Feedcellar::Web
2
+ #
3
+ # Copyright (C) 2014-2015 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "sinatra/base"
2
20
  require "haml"
21
+ require "padrino-helpers"
22
+ require "kaminari/sinatra"
3
23
  require "feedcellar/command"
4
24
 
5
25
  module Feedcellar
6
26
  class Web < Sinatra::Base
27
+ helpers Kaminari::Helpers::SinatraHelpers
28
+
7
29
  get "/" do
8
30
  haml :index
9
31
  end
@@ -17,9 +39,23 @@ module Feedcellar
17
39
  options ||= {}
18
40
  options[:resource_id] = params[:resource_id] if params[:resource_id]
19
41
  @feeds = search(words, options)
42
+ if @feeds
43
+ page = params[:page]
44
+ n_per_page = options[:n_per_page] || 50
45
+ @paginated_feeds = pagenate_feeds(@feeds, page, n_per_page)
46
+ end
20
47
  haml :index
21
48
  end
22
49
 
50
+ get "/registers.opml" do
51
+ content_type :xml
52
+ opml = nil
53
+ GroongaDatabase.new.open(Command.new.database_dir) do |database|
54
+ opml = Opml.build(database.resources.records)
55
+ end
56
+ opml
57
+ end
58
+
23
59
  helpers do
24
60
  def search(words, options={})
25
61
  database = GroongaDatabase.new
@@ -27,14 +63,21 @@ module Feedcellar
27
63
  GroongaSearcher.search(database, words, options)
28
64
  end
29
65
 
66
+ def pagenate_feeds(feeds, page, n_per_page)
67
+ Kaminari.paginate_array(feeds.to_a).page(page).per(n_per_page)
68
+ end
69
+
30
70
  def grouping(table)
31
71
  key = "resource"
32
72
  table.group(key).sort_by {|item| item.n_sub_records }.reverse
33
73
  end
34
74
 
35
- def markup_drilled_item(resource)
36
- link = url("/search?resource_id=#{resource._id}&word=#{params[:word]}")
37
- "<a href=#{link}>#{resource.title} (#{resource.n_sub_records})</a>"
75
+ def drilled_url(resource)
76
+ url("/search?resource_id=#{resource._id}&word=#{params[:word]}")
77
+ end
78
+
79
+ def drilled_label(resource)
80
+ "#{resource.title} (#{resource.n_sub_records})"
38
81
  end
39
82
 
40
83
  def groonga_version
@@ -1,3 +1,5 @@
1
+ # class Feedcellar::Window
2
+ #
1
3
  # Copyright (C) 2014 Masafumi Yokoyama <myokoym@gmail.com>
2
4
  #
3
5
  # This library is free software; you can redistribute it and/or
@@ -1,4 +1,22 @@
1
1
  #!/usr/bin/env ruby
2
+ #
3
+ # run-test.rb
4
+ #
5
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
6
+ #
7
+ # This library is free software; you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation; either
10
+ # version 2.1 of the License, or (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ # Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public
18
+ # License along with this library; if not, write to the Free Software
19
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2
20
 
3
21
  require "test-unit"
4
22
  require "test/unit/notify"
@@ -1,4 +1,22 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # class CommandTest
4
+ #
5
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
6
+ #
7
+ # This library is free software; you can redistribute it and/or
8
+ # modify it under the terms of the GNU Lesser General Public
9
+ # License as published by the Free Software Foundation; either
10
+ # version 2.1 of the License, or (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ # Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public
18
+ # License along with this library; if not, write to the Free Software
19
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2
20
 
3
21
  require "fileutils"
4
22
  require "stringio"
@@ -1,3 +1,21 @@
1
+ # class CursesViewTest
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "feedcellar/curses_view"
2
20
 
3
21
  class CursesViewTest < Test::Unit::TestCase
@@ -1,3 +1,21 @@
1
+ # class OpmlTest
2
+ #
3
+ # Copyright (C) 2013-2014 Masafumi Yokoyama <myokoym@gmail.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
1
19
  require "feedcellar/opml"
2
20
 
3
21
  class OpmlTest < Test::Unit::TestCase
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedcellar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masafumi Yokoyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-29 00:00:00.000000000 Z
11
+ date: 2015-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rroonga
@@ -52,6 +52,34 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: padrino-helpers
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: kaminari
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: haml
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -177,6 +205,7 @@ files:
177
205
  - ".gitignore"
178
206
  - ".travis.yml"
179
207
  - Gemfile
208
+ - LICENSE.txt
180
209
  - NEWS.md
181
210
  - README.md
182
211
  - Rakefile
@@ -198,7 +227,6 @@ files:
198
227
  - lib/feedcellar/views/layout.haml
199
228
  - lib/feedcellar/web.rb
200
229
  - lib/feedcellar/window.rb
201
- - license/lgpl-2.1.txt
202
230
  - test/fixtures/subscriptions.xml
203
231
  - test/run-test.rb
204
232
  - test/test-command.rb