llhaha 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
+ SHA256:
3
+ metadata.gz: 8d3952d270eb78fc92ebc4544ed9ebe998f90ffa31ee9075e62a6e06085b1032
4
+ data.tar.gz: 18b9f01e94ff4c2309b7b8516529e0b257f2a444bee14fa40e8a72559a9b8b63
5
+ SHA512:
6
+ metadata.gz: 84b353747545d1c65e348c99b1caf6500df01290d27d17be1bf077c2f2e56cc6912acae333c3dd7ab25680b8cd49420c933540a973431f18efcab082f0264e20
7
+ data.tar.gz: 5dfc8a66b9e6749a01b1475e7ecc11d6c525e96d1411aaa4456bc23dc3312a645e0b86087c1b007055e65357c1dc9181c210d6c83a32b77ddd5c4b1f87f8e654
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Llhaha
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/llhaha`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'llhaha'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install llhaha
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
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/[USERNAME]/llhaha.
data/bin/llhaha ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # bundle exec llhaha 执行命令行就可以
4
+ # 打印一下
5
+ puts "这是我的第一个 ruby 项目"
6
+
7
+ # 导入 主rb
8
+ require 'llhaha'
9
+
10
+ # 执行方法
11
+ # Llhaha::Writer.write_to("/Users/lilong/desktop/ruby/demo123.txt", "这是我的第一个 ruby 项目")
12
+
13
+ # 命令行方式传入参数
14
+ require 'pp'
15
+ pp ARGV
16
+
17
+ Llhaha::Writer.write_to(ARGV[0], ARGV[1])
18
+
19
+
20
+ # bundle exec rake release 会进行打tag 发布到https://rubygems.org/
@@ -0,0 +1,3 @@
1
+ module Llhaha
2
+ VERSION = "0.1.0"
3
+ end
data/lib/llhaha.rb ADDED
@@ -0,0 +1,11 @@
1
+ require "llhaha/version"
2
+
3
+ # 顶层 module 后面的代码都在这个作用域内
4
+ module Llhaha
5
+ class Error < StandardError; end
6
+ # Your code goes here...
7
+ # 导入 rb 文件
8
+ # require 'write_file'
9
+ # 使用 require_relative 就没有lib目录下的查询
10
+ require_relative 'write_file'
11
+ end
data/lib/write_file.rb ADDED
@@ -0,0 +1,11 @@
1
+ module Llhaha
2
+ # 文件写入内容
3
+ class Writer
4
+ def self.write_to(file_path, content)
5
+ File.open(file_path, "w+") do |f|
6
+ f.write(content)
7
+ end
8
+ end
9
+ end
10
+ end
11
+
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: llhaha
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - 李龙
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-07-06 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
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.12'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.12'
55
+ description: 这是我的第一个 ruby 项目
56
+ email:
57
+ - 835759069@qq.com
58
+ executables:
59
+ - llhaha
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - README.md
64
+ - bin/llhaha
65
+ - lib/llhaha.rb
66
+ - lib/llhaha/version.rb
67
+ - lib/write_file.rb
68
+ homepage: https://gitee.com/realxiaolong/llhaha.git
69
+ licenses: []
70
+ metadata: {}
71
+ post_install_message:
72
+ rdoc_options: []
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ requirements: []
86
+ rubygems_version: 3.0.9
87
+ signing_key:
88
+ specification_version: 4
89
+ summary: 这是我的第一个 ruby 项目
90
+ test_files: []