remote_job_scraper 0.4.1 → 0.4.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: 9ba8dfb3f3d55abef21cdec2cbd1c4766a628328
4
- data.tar.gz: b0698d31fbdfeb678b951b3eba98b979c0c209ef
3
+ metadata.gz: 72ba313413dc7997be5ff27cd80872eadf9a6a42
4
+ data.tar.gz: f60d2785e8577ef7a1e567d5753eba66f0957912
5
5
  SHA512:
6
- metadata.gz: 10ece664e0a557439052e81614902d4a9f315c5b57bed1ec9cd00c7a28fbb8c28e6b7929a5d4c4b6dafeb2c348a2c35b511ca7360db2467b3866e673779073ba
7
- data.tar.gz: 8d2f75321307aad5a52fdf8ac412617fe064b686f97fb920cabd12c3798b139a2c64215e4dff28f39ef360ef2805579b7494a3456329f0786bbf0347c70cd9f4
6
+ metadata.gz: 4aecc4a83e5c4a9737db7feca2029effcae08a618796c3dbe8b87f81c4373e1eee25cdc7726ebca1b8c220650840d7d0d59298e1c20291a5dc52bdfd29b4eadd
7
+ data.tar.gz: 54382e1d93daf8f50fc92ee79cc80a3527e93a1fbdceb5006e2db1ea4de71e2523cfce148ded18d59296bd79e8dca8121800b3afbe93815fb6858959653da3c6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- remote_job_scraper (0.4.0)
4
+ remote_job_scraper (0.4.1)
5
5
  nokogiri
6
6
  spreadsheet
7
7
  thor
data/README.md CHANGED
@@ -13,10 +13,10 @@ Going through many job listings and finding the right one may be a time-consumin
13
13
 
14
14
  $ remote_job_scraper
15
15
 
16
- * Tested with Ruby versions:
16
+ * Supported Ruby versions:
17
17
 
18
18
  * [x] 2.4.1
19
- * [x] 2.0.0
19
+ * [ ] 2.0.0 (https://github.com/rafaltrojanowski/remote_job_scraper/issues/1)
20
20
 
21
21
  ## Development
22
22
 
@@ -24,13 +24,6 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
24
24
 
25
25
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
26
 
27
- ## Todo
28
-
29
- * [] Set offer limit through config (processing RemoteOk is very slow)
30
- * [] Get rid if of all `if ENV['RAILS_ENV'] == test`
31
- * [] Grab more data e.g. Company name
32
- * [] Unify columns for sites and add headers in CSV/Excel (region)
33
-
34
27
  ## Contributing
35
28
 
36
29
  Bug reports and pull requests are welcome on GitHub at https://github.com/rafaltrojanowski/remote_job_scraper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -1,3 +1,3 @@
1
1
  module RemoteJobScraper
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -3,13 +3,15 @@ require 'spreadsheet'
3
3
  module Support
4
4
  module SpreadsheetCreator
5
5
 
6
- def self.generate(path: 'data/summary/', filename: 'remote_job_summary_.xls')
6
+ def self.generate(base_path: 'data/summary/', filename: 'remote_job_summary.xls')
7
7
  Spreadsheet.client_encoding = 'UTF-8'
8
8
  book = Spreadsheet::Workbook.new
9
9
 
10
10
  dirnames.each_with_index do |dirname, index|
11
11
  file = Dir.glob(dirname).first
12
12
  sheet = book.create_worksheet name: dirname.split("/")[-2]
13
+ column_width.each { |idx, width| sheet.column(idx).width = width }
14
+
13
15
  next if file.nil?
14
16
 
15
17
  CSV.foreach(file).with_index(0) do |row, index|
@@ -17,10 +19,24 @@ module Support
17
19
  end
18
20
  end
19
21
 
20
- FileUtils.mkdir_p absolute_path(path)
22
+ FileUtils.mkdir_p absolute_path(base_path)
23
+ book.write filepath(base_path, filename)
24
+ end
25
+
26
+ def self.column_width
27
+ {
28
+ 0 => 90,
29
+ 1 => 20,
30
+ 2 => 20,
31
+ 3 => 20
32
+ }
33
+ end
21
34
 
22
- book.write absolute_path(path).concat(
23
- Time.now.strftime("%Y%m%d%H%M%S").concat('_remote_jobs_summary.xls')
35
+ def self.filepath(path, filename)
36
+ absolute_path(path).concat(
37
+ Time.now.strftime("%Y%m%d%H%M%S")
38
+ .concat('_')
39
+ .concat(filename)
24
40
  )
25
41
  end
26
42
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_job_scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafał Trojanowski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-26 00:00:00.000000000 Z
11
+ date: 2019-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri