sync_files 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 011e6a60722b7ce84e2fe2e0d2ba25c64c6a01f17dbeab5767c5340fb8f64a27
4
+ data.tar.gz: 9974718b84722fe34606ac8f1a0f47a8aafea9c7e16a5d2a49effdea5ac3d91e
5
+ SHA512:
6
+ metadata.gz: 5615d39de51ef02b9eac3dbb60381d9c142198e390f39592da71d5e70109eeacca45070c375ad3d0e6a1640fcdc45b716da531eadf0c08e371b0d70eb41183e6
7
+ data.tar.gz: 73eebe3c25969008b46830042740f4f32bb0ac900acc041ffbd0d1948229b2efa973ad5848ab1762db99c9d49cf165d4d81697045684ad8ac2bf9816f73ae8d3
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require rails_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-01-23
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at martin@wulffeld.dk. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem "rake", "~> 13.0"
6
+
7
+ gem "rails"
8
+ gem "rspec", "~> 3.0"
9
+ gem "rspec-expectations"
data/Gemfile.lock ADDED
@@ -0,0 +1,189 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sync_files (0.1.0)
5
+ httparty
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actioncable (7.0.4.1)
11
+ actionpack (= 7.0.4.1)
12
+ activesupport (= 7.0.4.1)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailbox (7.0.4.1)
16
+ actionpack (= 7.0.4.1)
17
+ activejob (= 7.0.4.1)
18
+ activerecord (= 7.0.4.1)
19
+ activestorage (= 7.0.4.1)
20
+ activesupport (= 7.0.4.1)
21
+ mail (>= 2.7.1)
22
+ net-imap
23
+ net-pop
24
+ net-smtp
25
+ actionmailer (7.0.4.1)
26
+ actionpack (= 7.0.4.1)
27
+ actionview (= 7.0.4.1)
28
+ activejob (= 7.0.4.1)
29
+ activesupport (= 7.0.4.1)
30
+ mail (~> 2.5, >= 2.5.4)
31
+ net-imap
32
+ net-pop
33
+ net-smtp
34
+ rails-dom-testing (~> 2.0)
35
+ actionpack (7.0.4.1)
36
+ actionview (= 7.0.4.1)
37
+ activesupport (= 7.0.4.1)
38
+ rack (~> 2.0, >= 2.2.0)
39
+ rack-test (>= 0.6.3)
40
+ rails-dom-testing (~> 2.0)
41
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
42
+ actiontext (7.0.4.1)
43
+ actionpack (= 7.0.4.1)
44
+ activerecord (= 7.0.4.1)
45
+ activestorage (= 7.0.4.1)
46
+ activesupport (= 7.0.4.1)
47
+ globalid (>= 0.6.0)
48
+ nokogiri (>= 1.8.5)
49
+ actionview (7.0.4.1)
50
+ activesupport (= 7.0.4.1)
51
+ builder (~> 3.1)
52
+ erubi (~> 1.4)
53
+ rails-dom-testing (~> 2.0)
54
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
55
+ activejob (7.0.4.1)
56
+ activesupport (= 7.0.4.1)
57
+ globalid (>= 0.3.6)
58
+ activemodel (7.0.4.1)
59
+ activesupport (= 7.0.4.1)
60
+ activerecord (7.0.4.1)
61
+ activemodel (= 7.0.4.1)
62
+ activesupport (= 7.0.4.1)
63
+ activestorage (7.0.4.1)
64
+ actionpack (= 7.0.4.1)
65
+ activejob (= 7.0.4.1)
66
+ activerecord (= 7.0.4.1)
67
+ activesupport (= 7.0.4.1)
68
+ marcel (~> 1.0)
69
+ mini_mime (>= 1.1.0)
70
+ activesupport (7.0.4.1)
71
+ concurrent-ruby (~> 1.0, >= 1.0.2)
72
+ i18n (>= 1.6, < 2)
73
+ minitest (>= 5.1)
74
+ tzinfo (~> 2.0)
75
+ builder (3.2.4)
76
+ concurrent-ruby (1.2.0)
77
+ crass (1.0.6)
78
+ date (3.3.3)
79
+ diff-lcs (1.5.0)
80
+ erubi (1.12.0)
81
+ globalid (1.0.1)
82
+ activesupport (>= 5.0)
83
+ httparty (0.21.0)
84
+ mini_mime (>= 1.0.0)
85
+ multi_xml (>= 0.5.2)
86
+ i18n (1.12.0)
87
+ concurrent-ruby (~> 1.0)
88
+ loofah (2.19.1)
89
+ crass (~> 1.0.2)
90
+ nokogiri (>= 1.5.9)
91
+ mail (2.8.0.1)
92
+ mini_mime (>= 0.1.1)
93
+ net-imap
94
+ net-pop
95
+ net-smtp
96
+ marcel (1.0.2)
97
+ method_source (1.0.0)
98
+ mini_mime (1.1.2)
99
+ minitest (5.17.0)
100
+ multi_xml (0.6.0)
101
+ net-imap (0.3.4)
102
+ date
103
+ net-protocol
104
+ net-pop (0.1.2)
105
+ net-protocol
106
+ net-protocol (0.2.1)
107
+ timeout
108
+ net-smtp (0.3.3)
109
+ net-protocol
110
+ nio4r (2.5.8)
111
+ nokogiri (1.14.0-arm64-darwin)
112
+ racc (~> 1.4)
113
+ nokogiri (1.14.0-x86_64-linux)
114
+ racc (~> 1.4)
115
+ racc (1.6.2)
116
+ rack (2.2.6.2)
117
+ rack-test (2.0.2)
118
+ rack (>= 1.3)
119
+ rails (7.0.4.1)
120
+ actioncable (= 7.0.4.1)
121
+ actionmailbox (= 7.0.4.1)
122
+ actionmailer (= 7.0.4.1)
123
+ actionpack (= 7.0.4.1)
124
+ actiontext (= 7.0.4.1)
125
+ actionview (= 7.0.4.1)
126
+ activejob (= 7.0.4.1)
127
+ activemodel (= 7.0.4.1)
128
+ activerecord (= 7.0.4.1)
129
+ activestorage (= 7.0.4.1)
130
+ activesupport (= 7.0.4.1)
131
+ bundler (>= 1.15.0)
132
+ railties (= 7.0.4.1)
133
+ rails-dom-testing (2.0.3)
134
+ activesupport (>= 4.2.0)
135
+ nokogiri (>= 1.6)
136
+ rails-html-sanitizer (1.5.0)
137
+ loofah (~> 2.19, >= 2.19.1)
138
+ railties (7.0.4.1)
139
+ actionpack (= 7.0.4.1)
140
+ activesupport (= 7.0.4.1)
141
+ method_source
142
+ rake (>= 12.2)
143
+ thor (~> 1.0)
144
+ zeitwerk (~> 2.5)
145
+ rake (13.0.6)
146
+ rspec (3.12.0)
147
+ rspec-core (~> 3.12.0)
148
+ rspec-expectations (~> 3.12.0)
149
+ rspec-mocks (~> 3.12.0)
150
+ rspec-core (3.12.0)
151
+ rspec-support (~> 3.12.0)
152
+ rspec-expectations (3.12.2)
153
+ diff-lcs (>= 1.2.0, < 2.0)
154
+ rspec-support (~> 3.12.0)
155
+ rspec-mocks (3.12.3)
156
+ diff-lcs (>= 1.2.0, < 2.0)
157
+ rspec-support (~> 3.12.0)
158
+ rspec-rails (6.0.1)
159
+ actionpack (>= 6.1)
160
+ activesupport (>= 6.1)
161
+ railties (>= 6.1)
162
+ rspec-core (~> 3.11)
163
+ rspec-expectations (~> 3.11)
164
+ rspec-mocks (~> 3.11)
165
+ rspec-support (~> 3.11)
166
+ rspec-support (3.12.0)
167
+ thor (1.2.1)
168
+ timeout (0.3.1)
169
+ tzinfo (2.0.5)
170
+ concurrent-ruby (~> 1.0)
171
+ websocket-driver (0.7.5)
172
+ websocket-extensions (>= 0.1.0)
173
+ websocket-extensions (0.1.5)
174
+ zeitwerk (2.6.6)
175
+
176
+ PLATFORMS
177
+ arm64-darwin-21
178
+ x86_64-linux
179
+
180
+ DEPENDENCIES
181
+ rails
182
+ rake (~> 13.0)
183
+ rspec (~> 3.0)
184
+ rspec-expectations
185
+ rspec-rails
186
+ sync_files!
187
+
188
+ BUNDLED WITH
189
+ 2.3.7
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Martin Moen Wulffeld
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.
data/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # SyncFiles
2
+
3
+ A simple gem to synchronize web pages to files. I needed this functionality in a few scraping projects where fixtures representing web pages once in a while needed updating.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'sync_files'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install sync_files
20
+
21
+ ## Usage
22
+
23
+ ```
24
+ groups:
25
+ - settings:
26
+ destination: "spec/fixtures"
27
+ fixtures:
28
+ - filename: "cnn_frontpage.html"
29
+ url: "https://cnn.com"
30
+ ```
31
+
32
+ ## Development
33
+
34
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
35
+
36
+ ## Contributing
37
+
38
+ Bug reports and pull requests are welcome on GitHub at https://github.com/wulffeld/sync_files. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/sync_files/blob/main/CODE_OF_CONDUCT.md).
39
+
40
+ ## License
41
+
42
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
43
+
44
+ ## Code of Conduct
45
+
46
+ Everyone interacting in the SyncFiles project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/sync_files/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -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: %i[spec]
@@ -0,0 +1,29 @@
1
+ module SyncFiles
2
+ module Config
3
+ class Facade
4
+ def initialize
5
+ load_config
6
+ end
7
+
8
+ def valid?
9
+ SyncFiles::Config::Validation.new(config: @loader.config).valid?
10
+ end
11
+
12
+ def iterate
13
+ @config["groups"].each do |group|
14
+ group["fixtures"].each do |fixture|
15
+ yield fixture["filename"], fixture["url"], group["settings"]["destination"]
16
+ end
17
+ end
18
+ end
19
+
20
+ private
21
+
22
+ def load_config
23
+ @loader = SyncFiles::Config::Loader.new
24
+ @config = @loader.config
25
+ @loader.has_config?
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,35 @@
1
+ module SyncFiles
2
+ CONFIG_FILENAMES = %w(
3
+ config/sync_files.yml
4
+ .sync_files.yml
5
+ )
6
+
7
+ module Config
8
+ class Loader
9
+ attr_reader :config
10
+
11
+ def initialize
12
+ if config_filename
13
+ @config = YAML.load(File.read(config_filename))
14
+ else
15
+ puts "ERROR: No config file found. Please create one of the following files: #{CONFIG_FILENAMES.join(", ")}"
16
+ end
17
+ end
18
+
19
+ def has_config?
20
+ !@config.nil?
21
+ end
22
+
23
+ private
24
+
25
+ def config_filename
26
+ CONFIG_FILENAMES.each do |filename|
27
+ filename = File.join(::Rails.root.to_s, filename)
28
+ return filename if File.exist?(filename)
29
+ end
30
+
31
+ nil
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,22 @@
1
+ module SyncFiles
2
+ CONFIG_FILES = %w(
3
+ config/sync_files.yml
4
+ .sync_files.yml
5
+ )
6
+
7
+ module Config
8
+ class Parser
9
+ attr_reader :config
10
+
11
+ def initialize(config:)
12
+ @config = config
13
+ parse
14
+ end
15
+
16
+ private
17
+
18
+ def parse
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,41 @@
1
+ module SyncFiles
2
+ module Config
3
+ class Validation
4
+ class Invalid < Exception; end
5
+
6
+ def initialize(config:)
7
+ @config = config
8
+ end
9
+
10
+ def valid?
11
+ validate!
12
+ true
13
+ rescue SyncFiles::Config::Validation::Invalid => e
14
+ puts e.message
15
+ false
16
+ end
17
+
18
+ def validate!
19
+ raise Invalid.new("ERROR: No groups specified in the config file.") unless validate_groups
20
+ raise Invalid.new("ERROR: No files specified in the config file.") unless validate_fixtures
21
+ raise Invalid.new("ERROR: No destination specified in the config file.") unless validate_settings
22
+ end
23
+
24
+ def validate_settings
25
+ groups.all? { |group| !group["settings"].nil? && !group["settings"]["destination"].nil? }
26
+ end
27
+
28
+ def validate_fixtures
29
+ groups.all? { |group| !group["fixtures"].nil? && !group["fixtures"].empty? }
30
+ end
31
+
32
+ def validate_groups
33
+ !(@config["groups"].nil?)
34
+ end
35
+
36
+ def groups
37
+ @config["groups"]
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,4 @@
1
+ module SyncFiles
2
+ class Engine < ::Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module SyncFiles
2
+ VERSION = "0.1.0"
3
+ end
data/lib/sync_files.rb ADDED
@@ -0,0 +1,42 @@
1
+ require_relative "sync_files/version"
2
+
3
+ require "rake"
4
+ require "httparty"
5
+
6
+ require "sync_files/config/facade"
7
+ require "sync_files/config/loader"
8
+ require "sync_files/config/parser"
9
+ require "sync_files/config/validation"
10
+ require "sync_files/engine"
11
+
12
+ module SyncFiles
13
+ class Sync
14
+ def initialize
15
+ @facade = Config::Facade.new
16
+ end
17
+
18
+ def run
19
+ return unless @facade.valid?
20
+
21
+ process_fixtures
22
+ end
23
+
24
+ private
25
+
26
+ def process_fixtures
27
+ @facade.iterate do |filename, url, destination|
28
+ puts "Getting fixtures: #{url} #{filename}"
29
+
30
+ response = HTTParty.get(url)
31
+ if response.code != 200
32
+ puts "ERROR: #{response.code} #{response.message} for #{url}"
33
+ next
34
+ end
35
+
36
+ open(File.join(::Rails.root.to_s, destination, filename), "wb") do |file|
37
+ file << response.body
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,6 @@
1
+ namespace :sync_files do
2
+ desc "Synchronize files"
3
+ task :all => :environment do |t|
4
+ SyncFiles::Sync.new.run
5
+ end
6
+ end
@@ -0,0 +1,37 @@
1
+ require_relative "lib/sync_files/version"
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "sync_files"
5
+ spec.version = SyncFiles::VERSION
6
+ spec.authors = ["Martin Moen Wulffeld"]
7
+ spec.email = ["martin@wulffeld.dk"]
8
+
9
+ spec.summary = "Synchronize web pages to disk."
10
+ spec.description = "Adds a rake task to easily sync web pages to files. Handy for instance when you want to use a web page as a fixture in your, possibly scraping related, tests and the web page changes often."
11
+ spec.homepage = "https://github.com/wulffeld/sync_files"
12
+ spec.license = "MIT"
13
+ spec.required_ruby_version = ">= 3.0"
14
+
15
+ spec.metadata["homepage_uri"] = spec.homepage
16
+ spec.metadata["source_code_uri"] = "https://github.com/wulffeld/sync_files"
17
+ spec.metadata["changelog_uri"] = "https://github.com/wulffeld/sync_files/CHANGELOG.md"
18
+
19
+ # Specify which files should be added to the gem when it is released.
20
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
+ `git ls-files -z`.split("\x0").reject do |f|
23
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
24
+ end
25
+ end
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ # Uncomment to register a new dependency of your gem
31
+ spec.add_dependency "httparty"
32
+ spec.add_development_dependency "rails"
33
+ spec.add_development_dependency "rspec-rails"
34
+
35
+ # For more information and examples about making a new gem, check out our
36
+ # guide at: https://bundler.io/guides/creating_gem.html
37
+ end
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sync_files
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Martin Moen Wulffeld
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-01-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httparty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
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: rspec-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Adds a rake task to easily sync web pages to files. Handy for instance
56
+ when you want to use a web page as a fixture in your, possibly scraping related,
57
+ tests and the web page changes often.
58
+ email:
59
+ - martin@wulffeld.dk
60
+ executables: []
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - ".rspec"
65
+ - CHANGELOG.md
66
+ - CODE_OF_CONDUCT.md
67
+ - Gemfile
68
+ - Gemfile.lock
69
+ - LICENSE.txt
70
+ - README.md
71
+ - Rakefile
72
+ - lib/sync_files.rb
73
+ - lib/sync_files/config/facade.rb
74
+ - lib/sync_files/config/loader.rb
75
+ - lib/sync_files/config/parser.rb
76
+ - lib/sync_files/config/validation.rb
77
+ - lib/sync_files/engine.rb
78
+ - lib/sync_files/version.rb
79
+ - lib/tasks/sync_files.rake
80
+ - sync_files.gemspec
81
+ homepage: https://github.com/wulffeld/sync_files
82
+ licenses:
83
+ - MIT
84
+ metadata:
85
+ homepage_uri: https://github.com/wulffeld/sync_files
86
+ source_code_uri: https://github.com/wulffeld/sync_files
87
+ changelog_uri: https://github.com/wulffeld/sync_files/CHANGELOG.md
88
+ post_install_message:
89
+ rdoc_options: []
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '3.0'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubygems_version: 3.3.7
104
+ signing_key:
105
+ specification_version: 4
106
+ summary: Synchronize web pages to disk.
107
+ test_files: []