dredger 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ac1a1f2c6ccdfe45db4ce20879bcc18ba0c64aa9
4
+ data.tar.gz: f9a786b95bc3b3d1ecbe88cf03b82cf4b561e7a1
5
+ SHA512:
6
+ metadata.gz: 269689cecb81eb6664ccfeb6f50f35b987e4a618f527a9e1da54eddd6f02bc0e46e3fb7d5cd7cfda2efaff9238c30b78544b906e85a7cc1ed9ffb87a59c9fc32
7
+ data.tar.gz: a1b6b946b59f0a79c119a7191783f10fd2c1999b4cb30ca5b07c2f0e0b769a2e7d3aab33030be57536bcd8d029cdae13e1187e74407dab44c8754b5fc9780b9c
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .env
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 1.9.3
5
+ - jruby-19mode
6
+ - rbx-2
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in dredger.gemspec
4
+ gemspec
@@ -0,0 +1,79 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
+
18
+ guard "cucumber" do
19
+ watch(%r{^features/.+\.feature$})
20
+ watch(%r{^features/support/.+$}) { "features" }
21
+
22
+ watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
23
+ Dir[File.join("**/#{m[1]}.feature")][0] || "features"
24
+ end
25
+ end
26
+
27
+ # Note: The cmd option is now required due to the increasing number of ways
28
+ # rspec may be run, below are examples of the most common uses.
29
+ # * bundler: 'bundle exec rspec'
30
+ # * bundler binstubs: 'bin/rspec'
31
+ # * spring: 'bin/rspec' (This will use spring if running and you have
32
+ # installed the spring binstubs per the docs)
33
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
34
+ # * 'just' rspec: 'rspec'
35
+
36
+ guard :rspec, cmd: "bundle exec rspec" do
37
+ require "guard/rspec/dsl"
38
+ dsl = Guard::RSpec::Dsl.new(self)
39
+
40
+ # Feel free to open issues for suggestions and improvements
41
+
42
+ # RSpec files
43
+ rspec = dsl.rspec
44
+ watch(rspec.spec_helper) { rspec.spec_dir }
45
+ watch(rspec.spec_support) { rspec.spec_dir }
46
+ watch(rspec.spec_files)
47
+
48
+ # Ruby files
49
+ ruby = dsl.ruby
50
+ dsl.watch_spec_files_for(ruby.lib_files)
51
+
52
+ # Rails files
53
+ rails = dsl.rails(view_extensions: %w(erb haml slim))
54
+ dsl.watch_spec_files_for(rails.app_files)
55
+ dsl.watch_spec_files_for(rails.views)
56
+
57
+ watch(rails.controllers) do |m|
58
+ [
59
+ rspec.spec.("routing/#{m[1]}_routing"),
60
+ rspec.spec.("controllers/#{m[1]}_controller"),
61
+ rspec.spec.("acceptance/#{m[1]}")
62
+ ]
63
+ end
64
+
65
+ # Rails config changes
66
+ watch(rails.spec_helper) { rspec.spec_dir }
67
+ watch(rails.routes) { "#{rspec.spec_dir}/routing" }
68
+ watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
69
+
70
+ # Capybara features specs
71
+ watch(rails.view_dirs) { |m| rspec.spec.("features/#{m[1]}") }
72
+ watch(rails.layouts) { |m| rspec.spec.("features/#{m[1]}") }
73
+
74
+ # Turnip features and steps
75
+ watch(%r{^spec/acceptance/(.+)\.feature$})
76
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
77
+ Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
78
+ end
79
+ end
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 pikesley
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,9 @@
1
+ [![Build Status](http://img.shields.io/travis/pikesley/dredger.svg?style=flat-square)](https://travis-ci.org/pikesley/dredger)
2
+ [![Dependency Status](http://img.shields.io/gemnasium/pikesley/dredger.svg?style=flat-square)](https://gemnasium.com/pikesley/dredger)
3
+ [![Coverage Status](http://img.shields.io/coveralls/pikesley/dredger.svg?style=flat-square)](https://coveralls.io/r/pikesley/dredger)
4
+ [![Code Climate](http://img.shields.io/codeclimate/github/pikesley/dredger.svg?style=flat-square)](https://codeclimate.com/github/pikesley/dredger)
5
+ [![Gem Version](http://img.shields.io/gem/v/dredger.svg?style=flat-square)](https://rubygems.org/gems/dredger)
6
+ [![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://pikesley.mit-license.org)
7
+ [![Badges](http://img.shields.io/:badges-7/7-ff6799.svg?style=flat-square)](https://github.com/badges/badgerbadgerbadger)
8
+
9
+ # Dredger
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "dredger"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,45 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'dredger/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'dredger'
8
+ spec.version = Dredger::VERSION
9
+ spec.authors = ['pikesley']
10
+ spec.email = ['github@orgraphone.org']
11
+
12
+ spec.summary = %q{Twitter dredger}
13
+ spec.description = %q{Because I'm tired of writing this again and again}
14
+ spec.homepage = 'http://pikesley.org'
15
+ spec.license = 'MIT'
16
+
17
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
+ # delete this section to allow pushing this gem to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
21
+ else
22
+ raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.bindir = 'exe'
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ['lib']
29
+
30
+ spec.add_dependency 'twitter', '~> 5.14'
31
+ spec.add_dependency 'dotenv', '~> 2.0'
32
+ spec.add_dependency 'htmlentities', '~> 4.3'
33
+ spec.add_dependency 'tweetster', '~> 0.1'
34
+
35
+ spec.add_development_dependency 'bundler', '~> 1.10'
36
+ spec.add_development_dependency 'rake', '~> 10.4'
37
+ spec.add_development_dependency 'rspec', '~> 3.3'
38
+ spec.add_development_dependency 'guard-rspec', '~> 4.6'
39
+ spec.add_development_dependency 'guard-cucumber', '~> 1.6'
40
+ spec.add_development_dependency 'vcr', '~> 2.9'
41
+ spec.add_development_dependency 'webmock', '~> 1.21'
42
+ spec.add_development_dependency 'cucumber', '~> 2.1'
43
+ spec.add_development_dependency 'aruba', '~> 0.8'
44
+ spec.add_development_dependency 'coveralls', '~> 0.8'
45
+ end
@@ -0,0 +1,5 @@
1
+ require 'tweetster'
2
+
3
+ require 'dredger/version'
4
+ require 'dredger/hopper'
5
+ require 'dredger/helpers'
@@ -0,0 +1,5 @@
1
+ module Dredger
2
+ def self.encode term:
3
+ URI.encode "\"#{term}\""
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ module Dredger
2
+ class Hopper
3
+ def self.results term, count: 10, since: 0
4
+ ::Tweetster::Client.instance.client.search(Dredger.encode(term: term), result_type: 'recent').take(count)
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ module Dredger
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,256 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dredger
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - pikesley
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-10-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: twitter
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.14'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.14'
27
+ - !ruby/object:Gem::Dependency
28
+ name: dotenv
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: htmlentities
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '4.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: tweetster
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bundler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.10'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.10'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '10.4'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '10.4'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.3'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.3'
111
+ - !ruby/object:Gem::Dependency
112
+ name: guard-rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '4.6'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '4.6'
125
+ - !ruby/object:Gem::Dependency
126
+ name: guard-cucumber
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1.6'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '1.6'
139
+ - !ruby/object:Gem::Dependency
140
+ name: vcr
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '2.9'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '2.9'
153
+ - !ruby/object:Gem::Dependency
154
+ name: webmock
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.21'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '1.21'
167
+ - !ruby/object:Gem::Dependency
168
+ name: cucumber
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '2.1'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '2.1'
181
+ - !ruby/object:Gem::Dependency
182
+ name: aruba
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '0.8'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '0.8'
195
+ - !ruby/object:Gem::Dependency
196
+ name: coveralls
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '0.8'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '0.8'
209
+ description: Because I'm tired of writing this again and again
210
+ email:
211
+ - github@orgraphone.org
212
+ executables: []
213
+ extensions: []
214
+ extra_rdoc_files: []
215
+ files:
216
+ - ".gitignore"
217
+ - ".rspec"
218
+ - ".travis.yml"
219
+ - Gemfile
220
+ - Guardfile
221
+ - LICENSE.md
222
+ - README.md
223
+ - Rakefile
224
+ - bin/console
225
+ - bin/setup
226
+ - dredger.gemspec
227
+ - lib/dredger.rb
228
+ - lib/dredger/helpers.rb
229
+ - lib/dredger/hopper.rb
230
+ - lib/dredger/version.rb
231
+ homepage: http://pikesley.org
232
+ licenses:
233
+ - MIT
234
+ metadata:
235
+ allowed_push_host: https://rubygems.org
236
+ post_install_message:
237
+ rdoc_options: []
238
+ require_paths:
239
+ - lib
240
+ required_ruby_version: !ruby/object:Gem::Requirement
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: '0'
245
+ required_rubygems_version: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - ">="
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ requirements: []
251
+ rubyforge_project:
252
+ rubygems_version: 2.4.5
253
+ signing_key:
254
+ specification_version: 4
255
+ summary: Twitter dredger
256
+ test_files: []