russian_holidays_checkup 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/misc.xml +14 -0
- data/.idea/modules.xml +8 -0
- data/.idea/russian_holidays_checkup.iml +19 -0
- data/.idea/vcs.xml +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +1 -0
- data/[ +0 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/russian_holidays_checkup/core_ext.rb +25 -0
- data/lib/russian_holidays_checkup/version.rb +3 -0
- data/lib/russian_holidays_checkup.rb +8 -0
- data/russian_holidays_checkup.gemspec +26 -0
- metadata +90 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: be38cb2ebf643ff593f730300fdad23451ecf226
|
|
4
|
+
data.tar.gz: d09b9c7498ed8ef2b1e873bb5f9596c11ae39df6
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 543548ef1376f2004842a1c85066c08abfabc431d96fb1fb561c00f3a43904134e40d492db730cef58bd92ac78ae06cc941fa443fac84f4e24835ffc12ed3f71
|
|
7
|
+
data.tar.gz: 523b354da6c4306e730e8541cc6698c850efc9944e48870135c9178371f270a3d897e0668927efe51f786178b98ce8ce3f7ed50f260af88f285823c3d6af4ae2
|
data/.gitignore
ADDED
data/.idea/.name
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
russian_holidays_checkup
|
data/.idea/.rakeTasks
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
|
3
|
+
You are allowed to:
|
|
4
|
+
1. Remove rake task
|
|
5
|
+
2. Add existing rake tasks
|
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build russian_holidays_checkup-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install russian_holidays_checkup-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install russian_holidays_checkup-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push russian_holidays_checkup-0.1.0.gem to Rubygems" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
|
data/.idea/misc.xml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
|
4
|
+
<OptionsSetting value="true" id="Add" />
|
|
5
|
+
<OptionsSetting value="true" id="Remove" />
|
|
6
|
+
<OptionsSetting value="true" id="Checkout" />
|
|
7
|
+
<OptionsSetting value="true" id="Update" />
|
|
8
|
+
<OptionsSetting value="true" id="Status" />
|
|
9
|
+
<OptionsSetting value="true" id="Edit" />
|
|
10
|
+
<ConfirmationsSetting value="0" id="Add" />
|
|
11
|
+
<ConfirmationsSetting value="0" id="Remove" />
|
|
12
|
+
</component>
|
|
13
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.1.2-p95" project-jdk-type="RUBY_SDK" />
|
|
14
|
+
</project>
|
data/.idea/modules.xml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/russian_holidays_checkup.iml" filepath="$PROJECT_DIR$/.idea/russian_holidays_checkup.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
|
3
|
+
<component name="FacetManager">
|
|
4
|
+
<facet type="gem" name="Ruby Gem">
|
|
5
|
+
<configuration>
|
|
6
|
+
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
|
7
|
+
<option name="GEM_APP_TEST_PATH" value="" />
|
|
8
|
+
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
|
9
|
+
</configuration>
|
|
10
|
+
</facet>
|
|
11
|
+
</component>
|
|
12
|
+
<component name="NewModuleRootManager">
|
|
13
|
+
<content url="file://$MODULE_DIR$" />
|
|
14
|
+
<orderEntry type="inheritedJdk" />
|
|
15
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.10.4, ruby-2.1.2-p95) [gem]" level="application" />
|
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, ruby-2.1.2-p95) [gem]" level="application" />
|
|
18
|
+
</component>
|
|
19
|
+
</module>
|
data/.idea/vcs.xml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 nikolay martynov AKA fearlessstar shadows.of.unevenness@gmail.com
|
|
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,41 @@
|
|
|
1
|
+
# RussianHolidaysCheckup
|
|
2
|
+
|
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/russian_holidays_checkup`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Add this line to your application's Gemfile:
|
|
9
|
+
|
|
10
|
+
```ruby
|
|
11
|
+
gem 'russian_holidays_checkup'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
And then execute:
|
|
15
|
+
|
|
16
|
+
$ bundle
|
|
17
|
+
|
|
18
|
+
Or install it yourself as:
|
|
19
|
+
|
|
20
|
+
$ gem install russian_holidays_checkup
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
this gem has update DateTime class with method russian_holiday?
|
|
25
|
+
after require just use it
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
30
|
+
|
|
31
|
+
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).
|
|
32
|
+
|
|
33
|
+
## Contributing
|
|
34
|
+
|
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/fearlessstar/russian_holidays_checkup.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## License
|
|
39
|
+
|
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
41
|
+
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
data/[
ADDED
|
File without changes
|
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "russian_holidays_checkup"
|
|
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
|
data/bin/setup
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
DateTime.class_eval do
|
|
2
|
+
def russian_holiday?
|
|
3
|
+
all_russian_holidays = [
|
|
4
|
+
DateTime.new(2015, 1, 1),
|
|
5
|
+
DateTime.new(2015, 1, 2),
|
|
6
|
+
DateTime.new(2015, 1, 5),
|
|
7
|
+
DateTime.new(2015, 1, 6),
|
|
8
|
+
DateTime.new(2015, 1, 7),
|
|
9
|
+
DateTime.new(2015, 1, 8),
|
|
10
|
+
DateTime.new(2015, 1, 9),
|
|
11
|
+
DateTime.new(2015, 2, 23),
|
|
12
|
+
DateTime.new(2015, 3, 9),
|
|
13
|
+
DateTime.new(2015, 5, 1),
|
|
14
|
+
DateTime.new(2015, 5, 4),
|
|
15
|
+
DateTime.new(2015, 5, 11),
|
|
16
|
+
DateTime.new(2015, 6, 12),
|
|
17
|
+
DateTime.new(2015, 11, 4)
|
|
18
|
+
]
|
|
19
|
+
if all_russian_holidays.index(self).nil?
|
|
20
|
+
false
|
|
21
|
+
else
|
|
22
|
+
true
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
require "russian_holidays_checkup/version"
|
|
2
|
+
require "russian_holidays_checkup/core_ext"
|
|
3
|
+
|
|
4
|
+
module RussianHolidaysCheckup
|
|
5
|
+
# disclaimer: В целях рационального использования работниками выходных и нерабочих праздничных дней Правительство Российской Федерации в соответствии со статьей 112 ТК РФ вправе переносить выходные дни на другие дни. Поэтому в связи с совпадением нерабочих праздничных дней с выходными днями предусмотрен перенос последних: с субботы 3 января на пятницу 9 января и с воскресенья 4 января на понедельник 4 мая.
|
|
6
|
+
# в связи с вышеизложенным, на каждый год просто будут записаны конкретные даты которые являются дополнительными выходными днями после всех постановлений правительств и т.д.
|
|
7
|
+
# вот такая понимаешь загогулина, если у кого идеи как предвидеть загогулины правительства РФ на годы вперёд - пишите мне, вместе сделаем gem лучше !
|
|
8
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'russian_holidays_checkup/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "russian_holidays_checkup"
|
|
8
|
+
spec.version = RussianHolidaysCheckup::VERSION
|
|
9
|
+
spec.authors = ["nikolay martynov"]
|
|
10
|
+
spec.email = ["shadows.of.unevenness@gmail.com"]
|
|
11
|
+
|
|
12
|
+
spec.summary = "extends DateTime class by method russian_holiday?"
|
|
13
|
+
spec.homepage = "https://github.com/fearlessstar/russian_holidays_checkup.git"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
|
|
16
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
|
17
|
+
# delete this section to allow pushing this gem to any host.
|
|
18
|
+
|
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
20
|
+
spec.bindir = "exe"
|
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
22
|
+
spec.require_paths = ["lib"]
|
|
23
|
+
|
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
26
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: russian_holidays_checkup
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.3
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- nikolay martynov
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-07-03 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.10'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.10'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '10.0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '10.0'
|
|
41
|
+
description:
|
|
42
|
+
email:
|
|
43
|
+
- shadows.of.unevenness@gmail.com
|
|
44
|
+
executables: []
|
|
45
|
+
extensions: []
|
|
46
|
+
extra_rdoc_files: []
|
|
47
|
+
files:
|
|
48
|
+
- ".gitignore"
|
|
49
|
+
- ".idea/.name"
|
|
50
|
+
- ".idea/.rakeTasks"
|
|
51
|
+
- ".idea/misc.xml"
|
|
52
|
+
- ".idea/modules.xml"
|
|
53
|
+
- ".idea/russian_holidays_checkup.iml"
|
|
54
|
+
- ".idea/vcs.xml"
|
|
55
|
+
- Gemfile
|
|
56
|
+
- LICENSE.txt
|
|
57
|
+
- README.md
|
|
58
|
+
- Rakefile
|
|
59
|
+
- "["
|
|
60
|
+
- bin/console
|
|
61
|
+
- bin/setup
|
|
62
|
+
- lib/russian_holidays_checkup.rb
|
|
63
|
+
- lib/russian_holidays_checkup/core_ext.rb
|
|
64
|
+
- lib/russian_holidays_checkup/version.rb
|
|
65
|
+
- russian_holidays_checkup.gemspec
|
|
66
|
+
homepage: https://github.com/fearlessstar/russian_holidays_checkup.git
|
|
67
|
+
licenses:
|
|
68
|
+
- MIT
|
|
69
|
+
metadata: {}
|
|
70
|
+
post_install_message:
|
|
71
|
+
rdoc_options: []
|
|
72
|
+
require_paths:
|
|
73
|
+
- lib
|
|
74
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
|
+
requirements:
|
|
76
|
+
- - ">="
|
|
77
|
+
- !ruby/object:Gem::Version
|
|
78
|
+
version: '0'
|
|
79
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
|
+
requirements:
|
|
81
|
+
- - ">="
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: '0'
|
|
84
|
+
requirements: []
|
|
85
|
+
rubyforge_project:
|
|
86
|
+
rubygems_version: 2.4.8
|
|
87
|
+
signing_key:
|
|
88
|
+
specification_version: 4
|
|
89
|
+
summary: extends DateTime class by method russian_holiday?
|
|
90
|
+
test_files: []
|