b_format 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 62528445f8416563a62fca32d24b42311fde6467
4
+ data.tar.gz: a35785e592eee87e11e16e1be83468b77206aca3
5
+ SHA512:
6
+ metadata.gz: '0007914d2d6318261a78b6e2bfe6b4f230f01dd35ee1665589a98f43d0c4bce981d0919bab2dcff329e9efb816be2a829c172e85df86850c7f7874ddd24ace06'
7
+ data.tar.gz: f63bb93939514d8f75210e93e788eacad37f99b1d7aef0c532b0789c8710f8df98292ae3870708de1760b8b16ebdbc62c65f868e83f0c80cf472ca5f54953a01
data/.gem/credentials ADDED
File without changes
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at sibakoro.919@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in b_format.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,20 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ b_format (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (10.5.0)
10
+
11
+ PLATFORMS
12
+ x64-mingw32
13
+
14
+ DEPENDENCIES
15
+ b_format!
16
+ bundler (~> 1.17)
17
+ rake (~> 10.0)
18
+
19
+ BUNDLED WITH
20
+ 1.17.1
data/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # BFormat
2
+
3
+ bootstrapを使って最初に簡単なデザインを設定
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'b_format'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install b_format
20
+
21
+ ## Usage
22
+
23
+ bootstrapを使って最初に簡単なデザインを設定
24
+
25
+ ## Development
26
+
27
+ 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.
28
+
29
+ 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).
30
+
31
+ ## Contributing
32
+
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/b_format. 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.
34
+
35
+ ## Code of Conduct
36
+
37
+ Everyone interacting in the BFormat project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/b_format/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/b_format.gemspec ADDED
@@ -0,0 +1,38 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "b_format/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "b_format"
8
+ spec.version = BFormat::VERSION
9
+ spec.authors = ["sibakenY"]
10
+ spec.email = ["sibakoro.919@gmail.com"]
11
+
12
+ spec.summary = %q{bootstrapを使って最初の基本的なデザインを設定する}
13
+ spec.description = %q{bootstrapを使って最初の基本的なデザインを設定する}
14
+ spec.homepage = "https://github.com/Sibakeny/b_format"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/Sibakeny/b_format"
21
+ spec.metadata["changelog_uri"] = "https://github.com/Sibakeny/b_format"
22
+ else
23
+ raise "RubyGems 2.0 or newer is required to protect against " \
24
+ "public gem pushes."
25
+ end
26
+
27
+ # Specify which files should be added to the gem when it is released.
28
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
29
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
30
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
31
+ end
32
+ spec.bindir = "exe"
33
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
+ spec.require_paths = ["lib"]
35
+
36
+ spec.add_development_dependency "bundler", "~> 1.17"
37
+ spec.add_development_dependency "rake", "~> 10.0"
38
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "b_format"
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(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/b_format ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "b_format"
@@ -0,0 +1,3 @@
1
+ module BFormat
2
+ VERSION = "0.1.0"
3
+ end
data/lib/b_format.rb ADDED
@@ -0,0 +1,36 @@
1
+ require "b_format/version"
2
+ require 'boot_format_erb.rb'
3
+
4
+ module BFormat
5
+ class Error < StandardError; end
6
+
7
+
8
+ def self.bformat
9
+ @directory_all = []
10
+ Dir.chdir 'app/views' do
11
+ @directory_all << Dir.glob("*")
12
+ end
13
+ @directory_all.flatten!
14
+ @directory_all.each do |name|
15
+ if name == "layouts"
16
+ Dir.chdir 'app/views/layouts'
17
+ File.open '_header.html.erb', "w" do |file|
18
+ file.write APPLICATION_HTML_BOOT_HEADER
19
+ end
20
+ File.open '_footer.html.erb', "w" do |file|
21
+ file.write APPLICATION_HTML_BOOT_FOOTER
22
+ end
23
+ File.open 'application.html.erb', "r" do |file|
24
+ @data = file.read
25
+ @data.gsub!("<%= yield %>", APPLICATION_HTML_BOOT_BODY)
26
+ end
27
+ File.open 'application.html.erb', "w" do |file|
28
+ file.write @data
29
+ end
30
+ end
31
+ end
32
+ end
33
+
34
+
35
+
36
+ end
@@ -0,0 +1,53 @@
1
+ APPLICATION_HTML_BOOT_BODY = <<EOS
2
+ <%= render partial: '_header.html.erb' %>
3
+ <% if flash[:notice] %>
4
+ <div class="alert alert-success">
5
+ <%= flash[:notice] %>
6
+ </div>
7
+ <% end %>
8
+ <div class="container min-height">
9
+ <%= yield %>
10
+ </div>
11
+ <%= render partial: "_footer.html.erb" %>
12
+ EOS
13
+
14
+ APPLICATION_HTML_BOOT_HEADER = <<EOS
15
+ <nav class="navbar navbar-default navbar-static-top">
16
+ <div class="container">
17
+ <div class="navbar-header">
18
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
19
+ <span class="sr-only">Toggle navigation</span>
20
+ <span class="icon-bar"></span>
21
+ <span class="icon-bar"></span>
22
+ <span class="icon-bar"></span>
23
+ </button>
24
+ <a class="navbar-brand" href="#">Your Site Title !</a>
25
+ </div>
26
+ <div id="navbar" class="navbar-collapse collapse">
27
+ <ul class="nav navbar-nav">
28
+ <li><a href="#">Home</a></li>
29
+ <li><a href="#">Contact</a></li>
30
+ </ul>
31
+ <ul class="nav navbar-nav navbar-right">
32
+ <% unless session[:user_id] %>
33
+ <li><a href="#">Log in</a></li>
34
+ <li><a href="#">Create Account</a></li>
35
+ <% else %>
36
+ <li><a href="#">MyPage</a></li>
37
+ <li><%= link_to "Logout", "#"%></li>
38
+ <% end %>
39
+ </ul>
40
+ </div><!--/.nav-collapse -->
41
+ </div>
42
+ </nav>
43
+ EOS
44
+
45
+ APPLICATION_HTML_BOOT_FOOTER = <<EOS
46
+ <footer class="footer">
47
+ <div class="container">
48
+ <p class="text-muted">Your Site Title</p>
49
+ </div>
50
+ </footer>
51
+ EOS
52
+
53
+
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: b_format
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - sibakenY
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-12-09 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.17'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.17'
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: bootstrapを使って最初の基本的なデザインを設定する
42
+ email:
43
+ - sibakoro.919@gmail.com
44
+ executables:
45
+ - b_format
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gem/credentials"
50
+ - ".gitignore"
51
+ - CODE_OF_CONDUCT.md
52
+ - Gemfile
53
+ - Gemfile.lock
54
+ - README.md
55
+ - Rakefile
56
+ - b_format.gemspec
57
+ - bin/console
58
+ - bin/setup
59
+ - exe/b_format
60
+ - lib/b_format.rb
61
+ - lib/b_format/version.rb
62
+ - lib/boot_format_erb.rb
63
+ homepage: https://github.com/Sibakeny/b_format
64
+ licenses: []
65
+ metadata:
66
+ homepage_uri: https://github.com/Sibakeny/b_format
67
+ source_code_uri: https://github.com/Sibakeny/b_format
68
+ changelog_uri: https://github.com/Sibakeny/b_format
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubyforge_project:
85
+ rubygems_version: 2.6.13
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: bootstrapを使って最初の基本的なデザインを設定する
89
+ test_files: []